package org.mybatis.generator.api.plus;

import org.mybatis.generator.api.IntrospectedColumn;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;

import java.io.*;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

/**
 * @author wangfupeng
 */
public class MybatisUtilHtmlBack {

    public static void writeAllPage(IntrospectedTable introspectedTable, String htmlPath, String modelUrl, String fileServer, String serverUrl, String basePackage, String aspectPackage, String tokenErrorStatus, String encryptPasswordMethod) {
        writeJsCommonJqueryJs(htmlPath, serverUrl);
        writeJsCommonMd5Js(htmlPath, serverUrl);
        writeJsCommonSha256Js(htmlPath, serverUrl);
        writeJsCustomCustomJs(htmlPath, serverUrl, tokenErrorStatus);
        writeCssCustomCustomCss(htmlPath, serverUrl, tokenErrorStatus);
        writeJsCommonServerJs(htmlPath, serverUrl, tokenErrorStatus, fileServer);
        writeJsCommonValueJs(htmlPath, serverUrl, tokenErrorStatus, fileServer);
        writeCssCommonServerCss(htmlPath, serverUrl, tokenErrorStatus, fileServer);
        writeIndexPage(introspectedTable, htmlPath, modelUrl);
        writeCustomIndexJs(introspectedTable, htmlPath, modelUrl);
        writeCustomIndexCss(introspectedTable, htmlPath, modelUrl);
        writeLoginPage(introspectedTable, htmlPath, modelUrl, encryptPasswordMethod);
        writeLeftFramePage(introspectedTable, htmlPath, modelUrl);
        writeBlankPage(htmlPath, modelUrl);
        writeJsPlusTrumbowygJs(htmlPath, serverUrl);
        writeJsPlusJjlcJs(htmlPath, serverUrl);
        writeJsPlusTrumbowygCss(htmlPath, serverUrl);
        writeJsPlusIconsSvg(htmlPath, serverUrl);
        writeTableJsPage(introspectedTable, htmlPath, modelUrl, fileServer, serverUrl, basePackage, aspectPackage);
        writeTableJsCustomTableJs(introspectedTable, htmlPath, modelUrl, fileServer, serverUrl, basePackage, aspectPackage);
        writeTableCssPage(introspectedTable, htmlPath, modelUrl, fileServer, serverUrl, basePackage, aspectPackage);
        writeTableCssCustomTableCss(introspectedTable, htmlPath, modelUrl, fileServer, serverUrl, basePackage, aspectPackage);
        writeBlankPage(htmlPath, modelUrl);
        writeTablePage(introspectedTable, htmlPath, modelUrl, fileServer, serverUrl, basePackage, aspectPackage);
    }

    public static void writeIndexPage(IntrospectedTable introspectedTable, String htmlPath, String modelUrl) {
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "");
            folder.mkdirs();
            file = new File(htmlPath + "/index.html");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            bufferedWriter.write("<!DOCTYPE html>\n");
            bufferedWriter.write("<html lang=\"zh-CN\">\n");
            bufferedWriter.write("<head>\n");
            bufferedWriter.write("<meta charset=\"UTF-8\">\n");
            bufferedWriter.write("<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n");
            bufferedWriter.write("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\">\n");
            bufferedWriter.write("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\">\n");
            bufferedWriter.write("<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\">\n");
            bufferedWriter.write("<meta name=\"referrer\" content=\"always\">\n");
            bufferedWriter.write("<meta http-equiv=\"Cache-Control\" content=\"max-age=31536000\" />\n");
            bufferedWriter.write("<title>后台管理</title>\n");
            bufferedWriter.write("<style>.navigate:hover{background-color:#F66666;cursor:pointer;color:white;}.navigate{color:#666666;}\n" +
                    "html,body{\n" +
                    "height:100%;\n" +
                    "margin:0px;\n" +
                    "}</style>\n");
            writePageHead(bufferedWriter);
            bufferedWriter.write("<script>\n");
            bufferedWriter.write("$(function(){\n" +
                    "$('.class-aside').load('page-left-frame.html');\n" +
                    "var url=SERVER_URL+\"/v1/common/admin/validate/token\";\n" +
                    "var token=getLocalStorageItem(\"token\");\n" +
                    "$.ajax({\n" +
                    "url: url,\n" +
                    "type: \"get\",\n" +
                    "cache: false,\n" +
                    "async: true,\n" +
                    "headers: {\"token\": token },\n" +
                    "contentType: \"application/json\",\n" +
                    "success: function (res) {\n" +
                    "if(res.status!=200){\n" +
                    "validResForContent(res);\n" +
                    "}\n" +
                    "}\n" +
                    "});\n" +
                    "})\n");
            bufferedWriter.write("</script>\n");
            bufferedWriter.write("<script>\n");
            bufferedWriter.write("if(getLocalStorageItem('token')==undefined){\n" +
                    "location.href='page-login.html';\n" +
                    "}\n");
            bufferedWriter.write("</script>\n");
            bufferedWriter.write("</head>\n");
            bufferedWriter.write("<body>\n");
            bufferedWriter.write("<header class=\"class-header\" style=\"padding: 6px;height:3%; resize:both;\">\n");
            bufferedWriter.write("" +
                    "<span class='userInfo'><span class='navigate' style=' padding:6px;text-decoration: none; font-size:  12px; margin-left:12px;'  \n" +
                    "onclick=\"$('.class-section-iframe').attr('src','page-login.html');\" \n" +
                    "href='javascript:void(0)'>登录</span></span>\n" +
                    "<span class='navigate class-span-left-navigator-plus-or-minus' onclick=\"hideShowLeftAside()\"  \n" +
                    "style=' padding:6px;text-decoration: none; font-size:  12px; margin-left:12px;' >收起左边</span>\n" +
                    "<script>\n" +
                    "    $(function () {\n" +
                    "        var username = getLocalStorageItem(\"username\");\n" +
                    "        if (username != undefined) {\n" +
                    "            $(\".userInfo\").html(\"<span class='navigate' style=' padding:6px;text-decoration: none; font-size:  12px; margin-left:12px;' >\" + username + \"</span><span class='navigate' style=' padding:6px;text-decoration: none; font-size:  12px; margin-left:12px;' onclick='logout();'>登出</span>\");\n" +
                    "        }\n" +
                    "        if(getLocalStorageItem(\"rightFrameSrc\")!=undefined){\n" +
                    "            $(\".class-section-iframe\").attr(\"src\",getLocalStorageItem(\"rightFrameSrc\"));\n" +
                    "        }\n" +
                    "    });\n" +
                    "    var setUserInfo = function () {\n" +
                    "        var username = getLocalStorageItem(\"username\");\n" +
                    "        if (username != undefined) {\n" +
                    "            $(\".userInfo\").html(\"<span class='navigate' style=' padding:6px;text-decoration: none; font-size:  12px; margin-left:12px;' >\" + username + \"</span><span class='navigate' style=' padding:6px;text-decoration: none; font-size:  12px; margin-left:12px;' onclick='logout();'>登出</span>\");\n" +
                    "        }\n" +
                    "    }\n" +
                    "    var logout = function () {\n" +
                    "        removeLocalStorageItem(\"userId\");\n" +
                    "        removeLocalStorageItem(\"username\");\n" +
                    "        removeLocalStorageItem(\"token\");\n" +
                    "        gotoLoginForIndex();\n" +
                    "    }\n" +
                    "    var hideShowLeftAside = function () {\n" +
                    "        if($('.class-span-left-navigator-plus-or-minus').html()=='收起左边'){\n" +
                    "            $('.class-section').css('width','100%');\n" +
                    "            $('.class-aside').hide();\n" +
                    "            $('.class-span-left-navigator-plus-or-minus').html('展开左边');\n" +
                    "        }else{\n" +
                    "            $('.class-section').css('width','90%');\n" +
                    "            $('.class-aside').show();\n" +
                    "            $('.class-span-left-navigator-plus-or-minus').html('收起左边');\n" +
                    "        }\n" +
                    "    }\n" +
                    "</script>\n" +
                    "\n");
            bufferedWriter.write("</header>\n");
            bufferedWriter.write("<aside style=\"width: 10%; height:95%; overflow-y:scroll;float: left;font-size: 12px; resize:both;\" class=\"class-aside\">\n");
            bufferedWriter.write("</aside>\n");
            bufferedWriter.write("<section style=\"width:86%;height:95%; float:left; resize:both;\" class=\"class-section\">\n");
            bufferedWriter.write("<iframe  style=\"width:100%;height:100%; float:left;\" class='class-section-iframe' src='page-blank.html' ></iframe>\n");
            bufferedWriter.write("</section>\n");
            bufferedWriter.write("</body>\n");
            bufferedWriter.write("</html>\n");
            System.out.println("write to file success : " + file.getPath());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writePageHead(BufferedWriter bufferedWriter) throws IOException {
        bufferedWriter.write("<script src=\"content/page-common/js/jquery.js\" type=\"text/javascript\"></script>\n");
        bufferedWriter.write("<script src=\"content/page-common/js/server.js\" type=\"text/javascript\"></script>\n");
        bufferedWriter.write("<script src=\"content/page-common/js/md5.js\" type=\"text/javascript\"></script>\n");
        bufferedWriter.write("<script src=\"content/page-common/js/sha256.js\" type=\"text/javascript\"></script>\n");
        bufferedWriter.write("<script src=\"content/page-common/js/jcompress.js\" type=\"text/javascript\"></script>\n");
        bufferedWriter.write("<script src=\"content/page-common/js/common-value.js\" type=\"text/javascript\"></script>\n");
        bufferedWriter.write("<script src=\"custom/page-common/js/custom.js\" type=\"text/javascript\"></script>\n");
        bufferedWriter.write("<script src=\"custom/index/js/custom-index.js\" type=\"text/javascript\"></script>\n");
        bufferedWriter.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"content/page-common/css/server.css\">\n");
        bufferedWriter.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"custom/page-common/css/custom.css\">\n");
        bufferedWriter.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"custom/index/css/custom-index.css\">\n");
    }

    public static void writeLeftFramePage(IntrospectedTable introspectedTable, String htmlPath, String modelUrl) {
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        String table = introspectedTable.getBaseRecordType();
        String tableName = table.replaceAll(modelUrl + ".", "");
        try {
            File folder = new File(htmlPath + "");
            folder.mkdirs();
            file = new File(htmlPath + "/page-left-frame.html");
            //判断文件里有没有内容已经写过。
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            List<Map> fileList = MybatisUtilCommon.getFileListFromConfigFile();
            fileList.sort(new Comparator<Map>() {
                public int compare(Map o1, Map o2) {
                    String tableIntrospectedTableName1 = (String) o1.get("tableIntrospectedTableName");
                    String tableIntrospectedTableName2 = (String) o2.get("tableIntrospectedTableName");
                    return tableIntrospectedTableName1.compareTo(tableIntrospectedTableName2);
                }
            });
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file, false);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            for (int i = 0; i < fileList.size(); i++) {
                Map fileMap = fileList.get(i);
                String tableIntrospectedTableName = (String) fileMap.get("tableIntrospectedTableName");
                String tableDomainObjectName = (String) fileMap.get("tableDomainObjectName");
                List<Object> fieldOriginalNames = (List) fileMap.get("fieldOriginalNames");
                String tableRemarks = (String) fileMap.get("tableRemarks");
                bufferedWriter.write("<div class='navigate' onclick=\"$('.class-section-iframe').attr('src','" + tableIntrospectedTableName.replaceAll("_", "-") + ".html?rand='+Math.random());\"" +
                        "style=\"padding-left:6px;padding-top:6px;padding-bottom:6px;border-top:1px #a6a6a6 solid;border-bottom:1px #a6a6a6 solid;\" >" + tableRemarks + "</div>\n");
            }
            System.out.println("write to file success : " + file.getPath());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeBlankPage(String htmlPath, String serverUrl) {
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "");
            folder.mkdirs();
            file = new File(htmlPath + "/page-blank.html");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            bufferedWriter.write("<!DOCTYPE html><html><head></head><body style='font-size:16px;'>后台管理系统</body></html>\n");
            System.out.println("write to file success : " + file.getPath());
        } catch (
                IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeJsCustomCustomJs(String htmlPath, String serverUrl, String tokenErrorStatus) {
        if (serverUrl == null) {
            serverUrl = "http://localhost:8080/";
        }
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/custom/page-common/js");
            folder.mkdirs();
            file = new File(htmlPath + "/custom/page-common/js/custom.js");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            if (!file.exists()) {
                file.createNewFile();
                fileOutputStream = new FileOutputStream(file);
                bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
                bufferedWriter.write("\n");
                System.out.println("write to file success : " + file.getPath());
            } else {
                System.out.println("write to file success : " + file.getPath());
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }


    public static void writeCssCustomCustomCss(String htmlPath, String serverUrl, String tokenErrorStatus) {
        if (serverUrl == null) {
            serverUrl = "http://localhost:8080/";
        }
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/custom/page-common/css");
            folder.mkdirs();
            file = new File(htmlPath + "/custom/page-common/css/custom.css");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            if (!file.exists()) {
                file.createNewFile();
                fileOutputStream = new FileOutputStream(file);
                bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
                bufferedWriter.write("\n");
                System.out.println("write to file success : " + file.getPath());
            } else {
                System.out.println("write to file success : " + file.getPath());
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeJsPlusIconsSvg(String htmlPath, String serverUrl) {
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/content/page-common/css");
            folder.mkdirs();
            file = new File(htmlPath + "/content/page-common/css/icons.svg");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            bufferedWriter.write("<svg xmlns=\"http://www.w3.org/2000/svg\"><symbol id=\"trumbowyg-blockquote\" viewBox=\"0 0 72 72\"><path d=\"M21.3 31.9h-.6c.8-1.2 1.9-2.2 3.4-3.2 2.1-1.4 5-2.7 9.2-3.3l-1.4-8.9c-4.7.7-8.5 2.1-11.7 4-2.4 1.4-4.3 3.1-5.8 4.9-2.3 2.7-3.7 5.7-4.5 8.5-.8 2.8-1 5.4-1 7.5 0 2.3.3 4 .4 4.8 0 .1.1.3.1.4 1.2 5.4 6.1 9.5 11.9 9.5 6.7 0 12.2-5.4 12.2-12.2s-5.5-12-12.2-12zM49.5 31.9h-.6c.8-1.2 1.9-2.2 3.4-3.2 2.1-1.4 5-2.7 9.2-3.3l-1.4-8.9c-4.7.7-8.5 2.1-11.7 4-2.4 1.4-4.3 3.1-5.8 4.9-2.3 2.7-3.7 5.7-4.5 8.5-.8 2.8-1 5.4-1 7.5 0 2.3.3 4 .4 4.8 0 .1.1.3.1.4 1.2 5.4 6.1 9.5 11.9 9.5 6.7 0 12.2-5.4 12.2-12.2s-5.5-12-12.2-12z\"/></symbol><symbol id=\"trumbowyg-bold\" viewBox=\"0 0 72 72\"><path d=\"M51.1 37.8c-1.1-1.4-2.5-2.5-4.2-3.3 1.2-.8 2.1-1.8 2.8-3 1-1.6 1.5-3.5 1.5-5.3 0-2-.6-4-1.7-5.8-1.1-1.8-2.8-3.2-4.8-4.1-2-.9-4.6-1.3-7.8-1.3h-16v42h16.3c2.6 0 4.8-.2 6.7-.7 1.9-.5 3.4-1.2 4.7-2.1 1.3-1 2.4-2.4 3.2-4.1.9-1.7 1.3-3.6 1.3-5.7.2-2.5-.5-4.7-2-6.6zM40.8 50.2c-.6.1-1.8.2-3.4.2h-9V38.5h8.3c2.5 0 4.4.2 5.6.6 1.2.4 2 1 2.7 2 .6.9 1 2 1 3.3 0 1.1-.2 2.1-.7 2.9-.5.9-1 1.5-1.7 1.9-.8.4-1.7.8-2.8 1zm2.6-20.4c-.5.7-1.3 1.3-2.5 1.6-.8.3-2.5.4-4.8.4h-7.7V21.6h7.1c1.4 0 2.6 0 3.6.1s1.7.2 2.2.4c1 .3 1.7.8 2.2 1.7.5.9.8 1.8.8 3-.1 1.3-.4 2.2-.9 3z\"/></symbol><symbol id=\"trumbowyg-close\" viewBox=\"0 0 72 72\"><path d=\"M57 20.5l-5.4-5.4-15.5 15.5-15.6-15.5-5.4 5.4L30.7 36 15.1 51.5l5.4 5.4 15.6-15.5 15.5 15.5 5.4-5.4L41.5 36z\"/></symbol><symbol id=\"trumbowyg-create-link\" viewBox=\"0 0 72 72\"><path d=\"M31.1 48.9l-6.7 6.7c-.8.8-1.6.9-2.1.9s-1.4-.1-2.1-.9L15 50.4c-1.1-1.1-1.1-3.1 0-4.2l6.1-6.1.2-.2 6.5-6.5c-1.2-.6-2.5-.9-3.8-.9-2.3 0-4.6.9-6.3 2.6L11 41.8c-3.5 3.5-3.5 9.2 0 12.7l5.2 5.2c1.7 1.7 4 2.6 6.3 2.6s4.6-.9 6.3-2.6l6.7-6.7c2.5-2.6 3.1-6.7 1.5-10l-5.9 5.9zM38.7 22.5l6.7-6.7c.8-.8 1.6-.9 2.1-.9s1.4.1 2.1.9l5.2 5.2c1.1 1.1 1.1 3.1 0 4.2l-6.1 6.1-.2.2L42 38c1.2.6 2.5.9 3.8.9 2.3 0 4.6-.9 6.3-2.6l6.7-6.7c3.5-3.5 3.5-9.2 0-12.7l-5.2-5.2c-1.7-1.7-4-2.6-6.3-2.6s-4.6.9-6.3 2.6l-6.7 6.7c-2.7 2.7-3.3 6.9-1.7 10.2l6.1-6.1c0 .1 0 .1 0 0z\"/><path d=\"M44.2 30.5c.2-.2.4-.6.4-.9 0-.3-.1-.6-.4-.9l-2.3-2.3c-.3-.2-.6-.4-.9-.4-.3 0-.6.1-.9.4L25.9 40.6c-.2.2-.4.6-.4.9 0 .3.1.6.4.9l2.3 2.3c.2.2.6.4.9.4.3 0 .6-.1.9-.4l14.2-14.2zM49.9 55.4h-8.5v-5h8.5v-8.9h5.2v8.9h8.5v5h-8.5v8.9h-5.2v-8.9z\"/></symbol><symbol id=\"trumbowyg-del\" viewBox=\"0 0 72 72\"><path d=\"M45.8 45c0 1-.3 1.9-.9 2.8-.6.9-1.6 1.6-3 2.1s-3.1.8-5 .8c-2.1 0-4-.4-5.7-1.1-1.7-.7-2.9-1.7-3.6-2.7-.8-1.1-1.3-2.6-1.5-4.5l-.1-.8-6.7.6v.9c.1 2.8.9 5.4 2.3 7.6 1.5 2.3 3.5 4 6.1 5.1 2.6 1.1 5.7 1.6 9.4 1.6 2.9 0 5.6-.5 8-1.6 2.4-1.1 4.3-2.7 5.6-4.7 1.3-2 2-4.2 2-6.5 0-1.6-.3-3.1-.9-4.5l-.2-.6H44c0 .1 1.8 2.3 1.8 5.5zM29 28.9c-.8-.8-1.2-1.7-1.2-2.9 0-.7.1-1.3.4-1.9.3-.6.7-1.1 1.4-1.6.6-.5 1.4-.9 2.5-1.1 1.1-.3 2.4-.4 3.9-.4 2.9 0 5 .6 6.3 1.7 1.3 1.1 2.1 2.7 2.4 5.1l.1.9 6.8-.5v-.9c-.1-2.5-.8-4.7-2.1-6.7s-3.2-3.5-5.6-4.5c-2.4-1-5.1-1.5-8.1-1.5-2.8 0-5.3.5-7.6 1.4-2.3 1-4.2 2.4-5.4 4.3-1.2 1.9-1.9 3.9-1.9 6.1 0 1.7.4 3.4 1.2 4.9l.3.5h11.8c-2.3-.9-3.9-1.7-5.2-2.9zm13.3-6.2zM22.7 20.3zM13 34.1h46.1v3.4H13z\"/></symbol><symbol id=\"trumbowyg-em\" viewBox=\"0 0 72 72\"><path d=\"M26 57l10.1-42h7.2L33.2 57H26z\"/></symbol><symbol id=\"trumbowyg-fontsize\" viewBox=\"0 0 24 24\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M9 4v3h5v12h3V7h5V4H9zm-6 8h3v7h3v-7h3V9H3v3z\"/></symbol><symbol id=\"trumbowyg-fullscreen\" viewBox=\"0 0 72 72\"><path d=\"M25.2 7.1H7.1v17.7l6.7-6.5 10.5 10.5 4.5-4.5-10.4-10.5zM47.2 7.1l6.5 6.7-10.5 10.5 4.5 4.5 10.5-10.4 6.7 6.8V7.1zM47.7 43.2l-4.5 4.5 10.4 10.5-6.8 6.7h18.1V47.2l-6.7 6.5zM24.3 43.2L13.8 53.6l-6.7-6.8v18.1h17.7l-6.5-6.7 10.5-10.5z\"/><path fill=\"currentColor\" d=\"M10.7 28.8h18.1V11.2l-6.6 6.4L11.6 7.1l-4.5 4.5 10.5 10.5zM60.8 28.8l-6.4-6.6 10.5-10.6-4.5-4.5-10.5 10.5-6.7-6.9v18.1zM60.4 64.9l4.5-4.5-10.5-10.5 6.9-6.7H43.2v17.6l6.6-6.4zM11.6 64.9l10.5-10.5 6.7 6.9V43.2H11.1l6.5 6.6L7.1 60.4z\"/></symbol><symbol id=\"trumbowyg-h1\" viewBox=\"0 0 72 72\"><path d=\"M6.4 14.9h7.4v16.7h19.1V14.9h7.4V57h-7.4V38H13.8v19H6.4V14.9zM47.8 22.5c1.4 0 2.8-.1 4.1-.4 1.3-.2 2.5-.6 3.6-1.2 1.1-.5 2-1.3 2.8-2.1.8-.9 1.3-1.9 1.5-3.2h5.5v41.2h-7.4v-29H47.8v-5.3z\"/></symbol><symbol id=\"trumbowyg-h2\" viewBox=\"0 0 72 72\"><path d=\"M1.5 14.9h7.4v16.7H28V14.9h7.4V57H28V38H8.8v19H1.5V14.9zM70.2 56.9H42c0-3.4.9-6.4 2.5-9s3.8-4.8 6.6-6.7c1.3-1 2.7-1.9 4.2-2.9 1.5-.9 2.8-1.9 4-3 1.2-1.1 2.2-2.2 3-3.4.8-1.2 1.2-2.7 1.2-4.3 0-.7-.1-1.5-.3-2.4s-.5-1.6-1-2.4c-.5-.7-1.2-1.3-2.1-1.8-.9-.5-2.1-.7-3.5-.7-1.3 0-2.4.3-3.3.8s-1.6 1.3-2.1 2.2-.9 2-1.2 3.3c-.3 1.3-.4 2.6-.4 4.1h-6.7c0-2.3.3-4.4.9-6.3.6-1.9 1.5-3.6 2.7-5 1.2-1.4 2.7-2.5 4.4-3.3 1.7-.8 3.8-1.2 6.1-1.2 2.5 0 4.6.4 6.3 1.2 1.7.8 3.1 1.9 4.1 3.1 1 1.3 1.8 2.6 2.2 4.1.4 1.5.6 2.9.6 4.2 0 1.6-.3 3.1-.8 4.5-.5 1.3-1.2 2.6-2.1 3.7-.9 1.1-1.8 2.2-2.9 3.1-1.1.9-2.2 1.8-3.4 2.7-1.2.8-2.4 1.6-3.5 2.4-1.2.7-2.3 1.5-3.3 2.2-1 .7-1.9 1.5-2.6 2.3-.7.8-1.3 1.7-1.5 2.6h20.1v5.9z\"/></symbol><symbol id=\"trumbowyg-h3\" viewBox=\"0 0 72 72\"><path d=\"M1.4 14.5h7.4v16.7h19.1V14.5h7.4v42.1h-7.4v-19H8.8v19H1.4V14.5zM53.1 32.4c1.1 0 2.2 0 3.3-.2 1.1-.2 2.1-.5 2.9-1 .9-.5 1.6-1.2 2.1-2 .5-.9.8-1.9.8-3.2 0-1.8-.6-3.2-1.8-4.2-1.2-1.1-2.7-1.6-4.6-1.6-1.2 0-2.2.2-3.1.7-.9.5-1.6 1.1-2.2 1.9-.6.8-1 1.7-1.3 2.7-.3 1-.4 2-.4 3.1h-6.7c.1-2 .5-3.9 1.1-5.6.7-1.7 1.6-3.2 2.7-4.4s2.6-2.2 4.2-2.9c1.6-.7 3.5-1.1 5.6-1.1 1.6 0 3.2.2 4.7.7 1.6.5 2.9 1.2 4.2 2.1 1.2.9 2.2 2.1 3 3.4.7 1.4 1.1 3 1.1 4.8 0 2.1-.5 3.9-1.4 5.4-.9 1.6-2.4 2.7-4.4 3.4v.1c2.4.5 4.2 1.6 5.5 3.5 1.3 1.9 2 4.1 2 6.8 0 2-.4 3.7-1.2 5.3-.8 1.6-1.8 2.9-3.2 3.9-1.3 1.1-2.9 1.9-4.7 2.5-1.8.6-3.6.9-5.6.9-2.4 0-4.5-.3-6.3-1s-3.3-1.7-4.5-2.9c-1.2-1.3-2.1-2.8-2.7-4.5-.6-1.8-1-3.7-1-5.9h6.7c-.1 2.5.5 4.6 1.9 6.3 1.3 1.7 3.3 2.5 5.9 2.5 2.2 0 4.1-.6 5.6-1.9 1.5-1.3 2.3-3.1 2.3-5.4 0-1.6-.3-2.9-.9-3.8-.6-.9-1.5-1.7-2.5-2.2-1-.5-2.2-.8-3.4-.9-1.3-.1-2.6-.2-3.9-.1v-5.2z\"/></symbol><symbol id=\"trumbowyg-h4\" viewBox=\"0 0 72 72\"><path d=\"M1.5 14.9h7.4v16.7H28V14.9h7.4V57H28V38H8.9v19H1.5V14.9zM70.5 47.2h-5.3V57h-6.4v-9.8H41.2v-6.7l17.7-24.8h6.4v26.2h5.3v5.3zm-24.2-5.3h12.5V23.7h-.1L46.3 41.9z\"/></symbol><symbol id=\"trumbowyg-horizontal-rule\" viewBox=\"0 0 72 72\"><path d=\"M9.1 32h54v8h-54z\"/></symbol><symbol id=\"trumbowyg-insert-image\" viewBox=\"0 0 72 72\"><path d=\"M64 17v38H8V17h56m8-8H0v54h72V9z\"/><path d=\"M17.5 22C15 22 13 24 13 26.5s2 4.5 4.5 4.5 4.5-2 4.5-4.5-2-4.5-4.5-4.5zM16 50h27L29.5 32zM36 36.2l8.9-8.5L60.2 50H45.9S35.6 35.9 36 36.2z\"/></symbol><symbol id=\"trumbowyg-italic\" viewBox=\"0 0 72 72\"><path d=\"M26 57l10.1-42h7.2L33.2 57H26z\"/></symbol><symbol id=\"trumbowyg-justify-center\" viewBox=\"0 0 72 72\"><path d=\"M9 14h54v8H9zM9 50h54v8H9zM18 32h36v8H18z\"/></symbol><symbol id=\"trumbowyg-justify-full\" viewBox=\"0 0 72 72\"><path d=\"M9 14h54v8H9zM9 50h54v8H9zM9 32h54v8H9z\"/></symbol><symbol id=\"trumbowyg-justify-left\" viewBox=\"0 0 72 72\"><path d=\"M9 14h54v8H9zM9 50h54v8H9zM9 32h36v8H9z\"/></symbol><symbol id=\"trumbowyg-justify-right\" viewBox=\"0 0 72 72\"><path d=\"M9 14h54v8H9zM9 50h54v8H9zM27 32h36v8H27z\"/></symbol><symbol id=\"trumbowyg-lineheight\" viewBox=\"0 0 72 72\"><path d=\"M31 14h36v8H31zM31 50h36v8H31zM31 32h30v8H31z\"/><path stroke-miterlimit=\"10\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3.6428\" d=\"M7.82 47.207l8.332 8.15 8.106-8.15M24.276 24.635l-8.333-8.15-8.105 8.15\"/><path d=\"M14.347 53.761v-36h3.385v36z\"/></symbol><symbol id=\"trumbowyg-link\" viewBox=\"0 0 72 72\"><path d=\"M30.9 49.1l-6.7 6.7c-.8.8-1.6.9-2.1.9s-1.4-.1-2.1-.9l-5.2-5.2c-1.1-1.1-1.1-3.1 0-4.2l6.1-6.1.2-.2 6.5-6.5c-1.2-.6-2.5-.9-3.8-.9-2.3 0-4.6.9-6.3 2.6L10.8 42c-3.5 3.5-3.5 9.2 0 12.7l5.2 5.2c1.7 1.7 4 2.6 6.3 2.6s4.6-.9 6.3-2.6l6.7-6.7C38 50.5 38.6 46.3 37 43l-6.1 6.1zM38.5 22.7l6.7-6.7c.8-.8 1.6-.9 2.1-.9s1.4.1 2.1.9l5.2 5.2c1.1 1.1 1.1 3.1 0 4.2l-6.1 6.1-.2.2-6.5 6.5c1.2.6 2.5.9 3.8.9 2.3 0 4.6-.9 6.3-2.6l6.7-6.7c3.5-3.5 3.5-9.2 0-12.7l-5.2-5.2c-1.7-1.7-4-2.6-6.3-2.6s-4.6.9-6.3 2.6l-6.7 6.7c-2.7 2.7-3.3 6.9-1.7 10.2l6.1-6.1z\"/><path d=\"M44.1 30.7c.2-.2.4-.6.4-.9 0-.3-.1-.6-.4-.9l-2.3-2.3c-.2-.2-.6-.4-.9-.4-.3 0-.6.1-.9.4L25.8 40.8c-.2.2-.4.6-.4.9 0 .3.1.6.4.9l2.3 2.3c.2.2.6.4.9.4.3 0 .6-.1.9-.4l14.2-14.2z\"/></symbol><symbol id=\"trumbowyg-ordered-list\" viewBox=\"0 0 72 72\"><path d=\"M27 14h36v8H27zM27 50h36v8H27zM27 32h36v8H27zM11.8 15.8V22h1.8v-7.8h-1.5l-2.1 1 .3 1.3zM12.1 38.5l.7-.6c1.1-1 2.1-2.1 2.1-3.4 0-1.4-1-2.4-2.7-2.4-1.1 0-2 .4-2.6.8l.5 1.3c.4-.3 1-.6 1.7-.6.9 0 1.3.5 1.3 1.1 0 .9-.9 1.8-2.6 3.3l-1 .9V40H15v-1.5h-2.9zM13.3 53.9c1-.4 1.4-1 1.4-1.8 0-1.1-.9-1.9-2.6-1.9-1 0-1.9.3-2.4.6l.4 1.3c.3-.2 1-.5 1.6-.5.8 0 1.2.3 1.2.8 0 .7-.8.9-1.4.9h-.7v1.3h.7c.8 0 1.6.3 1.6 1.1 0 .6-.5 1-1.4 1-.7 0-1.5-.3-1.8-.5l-.4 1.4c.5.3 1.3.6 2.3.6 2 0 3.2-1 3.2-2.4 0-1.1-.8-1.8-1.7-1.9z\"/></symbol><symbol id=\"trumbowyg-p\" viewBox=\"0 0 72 72\"><path d=\"M47.8 15.1H30.1c-4.7 0-8.5 3.7-8.5 8.4s3.7 8.4 8.4 8.4v25h7V19.8h3v37.1h4.1V19.8h3.7v-4.7z\"/></symbol><symbol id=\"trumbowyg-redo\" viewBox=\"0 0 72 72\"><path d=\"M10.8 51.2c0-5.1 2.1-9.7 5.4-13.1 3.3-3.3 8-5.4 13.1-5.4H46v-12L61.3 36 45.9 51.3V39.1H29.3c-3.3 0-6.4 1.3-8.5 3.5-2.2 2.2-3.5 5.2-3.5 8.5h-6.5z\"/></symbol><symbol id=\"trumbowyg-removeformat\" viewBox=\"0 0 72 72\"><path d=\"M58.2 54.6L52 48.5l3.6-3.6 6.1 6.1 6.4-6.4 3.8 3.8-6.4 6.4 6.1 6.1-3.6 3.6-6.1-6.1-6.4 6.4-3.7-3.8 6.4-6.4zM21.7 52.1H50V57H21.7zM18.8 15.2h34.1v6.4H39.5v24.2h-7.4V21.5H18.8v-6.3z\"/></symbol><symbol id=\"trumbowyg-strikethrough\" viewBox=\"0 0 72 72\"><path d=\"M45.8 45c0 1-.3 1.9-.9 2.8-.6.9-1.6 1.6-3 2.1s-3.1.8-5 .8c-2.1 0-4-.4-5.7-1.1-1.7-.7-2.9-1.7-3.6-2.7-.8-1.1-1.3-2.6-1.5-4.5l-.1-.8-6.7.6v.9c.1 2.8.9 5.4 2.3 7.6 1.5 2.3 3.5 4 6.1 5.1 2.6 1.1 5.7 1.6 9.4 1.6 2.9 0 5.6-.5 8-1.6 2.4-1.1 4.3-2.7 5.6-4.7 1.3-2 2-4.2 2-6.5 0-1.6-.3-3.1-.9-4.5l-.2-.6H44c0 .1 1.8 2.3 1.8 5.5zM29 28.9c-.8-.8-1.2-1.7-1.2-2.9 0-.7.1-1.3.4-1.9.3-.6.7-1.1 1.4-1.6.6-.5 1.4-.9 2.5-1.1 1.1-.3 2.4-.4 3.9-.4 2.9 0 5 .6 6.3 1.7 1.3 1.1 2.1 2.7 2.4 5.1l.1.9 6.8-.5v-.9c-.1-2.5-.8-4.7-2.1-6.7s-3.2-3.5-5.6-4.5c-2.4-1-5.1-1.5-8.1-1.5-2.8 0-5.3.5-7.6 1.4-2.3 1-4.2 2.4-5.4 4.3-1.2 1.9-1.9 3.9-1.9 6.1 0 1.7.4 3.4 1.2 4.9l.3.5h11.8c-2.3-.9-3.9-1.7-5.2-2.9zm13.3-6.2zM22.7 20.3zM13 34.1h46.1v3.4H13z\"/></symbol><symbol id=\"trumbowyg-strong\" viewBox=\"0 0 72 72\"><path d=\"M51.1 37.8c-1.1-1.4-2.5-2.5-4.2-3.3 1.2-.8 2.1-1.8 2.8-3 1-1.6 1.5-3.5 1.5-5.3 0-2-.6-4-1.7-5.8-1.1-1.8-2.8-3.2-4.8-4.1-2-.9-4.6-1.3-7.8-1.3h-16v42h16.3c2.6 0 4.8-.2 6.7-.7 1.9-.5 3.4-1.2 4.7-2.1 1.3-1 2.4-2.4 3.2-4.1.9-1.7 1.3-3.6 1.3-5.7.2-2.5-.5-4.7-2-6.6zM40.8 50.2c-.6.1-1.8.2-3.4.2h-9V38.5h8.3c2.5 0 4.4.2 5.6.6 1.2.4 2 1 2.7 2 .6.9 1 2 1 3.3 0 1.1-.2 2.1-.7 2.9-.5.9-1 1.5-1.7 1.9-.8.4-1.7.8-2.8 1zm2.6-20.4c-.5.7-1.3 1.3-2.5 1.6-.8.3-2.5.4-4.8.4h-7.7V21.6h7.1c1.4 0 2.6 0 3.6.1s1.7.2 2.2.4c1 .3 1.7.8 2.2 1.7.5.9.8 1.8.8 3-.1 1.3-.4 2.2-.9 3z\"/></symbol><symbol id=\"trumbowyg-subscript\" viewBox=\"0 0 72 72\"><path d=\"M32 15h7.8L56 57.1h-7.9L44.3 46H27.4l-4 11.1h-7.6L32 15zm-2.5 25.4h12.9L36 22.3h-.2l-6.3 18.1zM58.7 59.9c.6-1.4 2-2.8 4.1-4.4 1.9-1.3 3.1-2.3 3.7-2.9.8-.9 1.3-1.9 1.3-3 0-.9-.2-1.6-.7-2.2-.5-.6-1.2-.9-2.1-.9-1.2 0-2.1.5-2.5 1.4-.3.5-.4 1.4-.5 2.5h-4c.1-1.8.4-3.2 1-4.3 1.1-2.1 3-3.1 5.8-3.1 2.2 0 3.9.6 5.2 1.8 1.3 1.2 1.9 2.8 1.9 4.8 0 1.5-.5 2.9-1.4 4.1-.6.8-1.6 1.7-3 2.6L66 57.7c-1 .7-1.7 1.2-2.1 1.6-.4.3-.7.7-1 1.1H72V64H57.8c0-1.5.3-2.8.9-4.1z\"/></symbol><symbol id=\"trumbowyg-superscript\" viewBox=\"0 0 72 72\"><path d=\"M32 15h7.8L56 57.1h-7.9l-4-11.1H27.4l-4 11.1h-7.6L32 15zm-2.5 25.4h12.9L36 22.3h-.2l-6.3 18.1zM49.6 28.8c.5-1.1 1.6-2.3 3.4-3.6 1.5-1.1 2.5-1.9 3-2.4.7-.7 1-1.6 1-2.4 0-.7-.2-1.3-.6-1.8-.4-.5-1-.7-1.7-.7-1 0-1.7.4-2.1 1.1-.2.4-.3 1.1-.4 2.1H49c.1-1.5.3-2.6.8-3.5.9-1.7 2.5-2.6 4.8-2.6 1.8 0 3.2.5 4.3 1.5 1.1 1 1.6 2.3 1.6 4 0 1.3-.4 2.4-1.1 3.4-.5.7-1.3 1.4-2.4 2.2l-1.3 1c-.8.6-1.4 1-1.7 1.3-.3.3-.6.6-.8.9h7.4v3H48.8c0-1.3.3-2.4.8-3.5z\"/></symbol><symbol id=\"trumbowyg-table\" viewBox=\"0 0 72 72\"><path d=\"M25.686 51.38v-6.347q0-.462-.297-.76-.298-.297-.761-.297H14.04q-.463 0-.761.297-.298.298-.298.76v6.346q0 .463.298.76.298.298.76.298h10.589q.463 0 .76-.298.298-.297.298-.76zm0-12.692v-6.346q0-.463-.297-.76-.298-.298-.761-.298H14.04q-.463 0-.761.298-.298.297-.298.76v6.346q0 .462.298.76.298.297.76.297h10.589q.463 0 .76-.297.298-.298.298-.76zm16.94 12.691v-6.346q0-.462-.297-.76-.298-.297-.761-.297H30.98q-.463 0-.76.297-.299.298-.299.76v6.346q0 .463.298.76.298.298.761.298h10.588q.463 0 .76-.298.299-.297.299-.76zm-16.94-25.383v-6.345q0-.463-.297-.76-.298-.298-.761-.298H14.04q-.463 0-.761.297-.298.298-.298.76v6.346q0 .463.298.76.298.298.76.298h10.589q.463 0 .76-.298.298-.297.298-.76zm16.94 12.692v-6.346q0-.463-.297-.76-.298-.298-.761-.298H30.98q-.463 0-.76.298-.299.297-.299.76v6.346q0 .462.298.76.298.297.761.297h10.588q.463 0 .76-.297.299-.298.299-.76zm16.94 12.691v-6.346q0-.462-.297-.76-.298-.297-.76-.297H47.92q-.463 0-.76.297-.298.298-.298.76v6.346q0 .463.297.76.298.298.761.298h10.588q.463 0 .761-.298.298-.297.298-.76zm-16.94-25.383v-6.345q0-.463-.297-.76-.298-.298-.761-.298H30.98q-.463 0-.76.297-.299.298-.299.76v6.346q0 .463.298.76.298.298.761.298h10.588q.463 0 .76-.298.299-.297.299-.76zm16.94 12.692v-6.346q0-.463-.297-.76-.298-.298-.76-.298H47.92q-.463 0-.76.298-.298.297-.298.76v6.346q0 .462.297.76.298.297.761.297h10.588q.463 0 .761-.297.298-.298.298-.76zm0-12.692v-6.345q0-.463-.297-.76-.298-.298-.76-.298H47.92q-.463 0-.76.297-.298.298-.298.76v6.346q0 .463.297.76.298.298.761.298h10.588q.463 0 .761-.298.298-.297.298-.76zm4.236-10.576v35.96q0 2.18-1.555 3.734-1.555 1.553-3.739 1.553H14.04q-2.184 0-3.739-1.553-1.555-1.553-1.555-3.735V15.42q0-2.181 1.555-3.735 1.555-1.553 3.739-1.553h44.468q2.184 0 3.739 1.553 1.555 1.554 1.555 3.735z\"/></symbol><symbol id=\"trumbowyg-underline\" viewBox=\"0 0 72 72\"><path d=\"M36 35zM15.2 55.9h41.6V59H15.2zM21.1 13.9h6.4v21.2c0 1.2.1 2.5.2 3.7.1 1.3.5 2.4 1 3.4.6 1 1.4 1.8 2.6 2.5 1.1.6 2.7 1 4.8 1 2.1 0 3.7-.3 4.8-1 1.1-.6 2-1.5 2.6-2.5.6-1 .9-2.1 1-3.4.1-1.3.2-2.5.2-3.7V13.9H51v23.3c0 2.3-.4 4.4-1.1 6.1-.7 1.7-1.7 3.2-3 4.4-1.3 1.2-2.9 2-4.7 2.6-1.8.6-3.9.9-6.1.9-2.2 0-4.3-.3-6.1-.9-1.8-.6-3.4-1.5-4.7-2.6-1.3-1.2-2.3-2.6-3-4.4-.7-1.7-1.1-3.8-1.1-6.1V13.9z\"/></symbol><symbol id=\"trumbowyg-undo\" viewBox=\"0 0 72 72\"><path d=\"M61.2 51.2c0-5.1-2.1-9.7-5.4-13.1-3.3-3.3-8-5.4-13.1-5.4H26.1v-12L10.8 36l15.3 15.3V39.1h16.7c3.3 0 6.4 1.3 8.5 3.5 2.2 2.2 3.5 5.2 3.5 8.5h6.4z\"/></symbol><symbol id=\"trumbowyg-unlink\" viewBox=\"0 0 72 72\"><path d=\"M30.9 49.1l-6.7 6.7c-.8.8-1.6.9-2.1.9s-1.4-.1-2.1-.9l-5.2-5.2c-1.1-1.1-1.1-3.1 0-4.2l6.1-6.1.2-.2 6.5-6.5c-1.2-.6-2.5-.9-3.8-.9-2.3 0-4.6.9-6.3 2.6L10.8 42c-3.5 3.5-3.5 9.2 0 12.7l5.2 5.2c1.7 1.7 4 2.6 6.3 2.6s4.6-.9 6.3-2.6l6.7-6.7C38 50.5 38.6 46.3 37 43l-6.1 6.1zM38.5 22.7l6.7-6.7c.8-.8 1.6-.9 2.1-.9s1.4.1 2.1.9l5.2 5.2c1.1 1.1 1.1 3.1 0 4.2l-6.1 6.1-.2.2-6.5 6.5c1.2.6 2.5.9 3.8.9 2.3 0 4.6-.9 6.3-2.6l6.7-6.7c3.5-3.5 3.5-9.2 0-12.7l-5.2-5.2c-1.7-1.7-4-2.6-6.3-2.6s-4.6.9-6.3 2.6l-6.7 6.7c-2.7 2.7-3.3 6.9-1.7 10.2l6.1-6.1z\"/><path d=\"M44.1 30.7c.2-.2.4-.6.4-.9 0-.3-.1-.6-.4-.9l-2.3-2.3c-.2-.2-.6-.4-.9-.4-.3 0-.6.1-.9.4L25.8 40.8c-.2.2-.4.6-.4.9 0 .3.1.6.4.9l2.3 2.3c.2.2.6.4.9.4.3 0 .6-.1.9-.4l14.2-14.2zM41.3 55.8v-5h22.2v5H41.3z\"/></symbol><symbol id=\"trumbowyg-unordered-list\" viewBox=\"0 0 72 72\"><path d=\"M27 14h36v8H27zM27 50h36v8H27zM9 50h9v8H9zM9 32h9v8H9zM9 14h9v8H9zM27 32h36v8H27z\"/></symbol><symbol id=\"trumbowyg-view-html\" viewBox=\"0 0 72 72\"><path fill=\"none\" stroke=\"currentColor\" stroke-width=\"8\" stroke-miterlimit=\"10\" d=\"M26.9 17.9L9 36.2 26.9 54M45 54l17.9-18.3L45 17.9\"/></symbol><symbol id=\"trumbowyg-base64\" viewBox=\"0 0 72 72\"><path d=\"M64 17v38H8V17h56m8-8H0v54h72V9z\"/><path d=\"M29.9 28.9c-.5-.5-1.1-.8-1.8-.8s-1.4.2-1.9.7c-.5.4-.9 1-1.2 1.6-.3.6-.5 1.3-.6 2.1-.1.7-.2 1.4-.2 1.9l.1.1c.6-.8 1.2-1.4 2-1.8.8-.4 1.7-.5 2.7-.5.9 0 1.8.2 2.6.6.8.4 1.6.9 2.2 1.5.6.6 1 1.3 1.2 2.2.3.8.4 1.6.4 2.5 0 1.1-.2 2.1-.5 3-.3.9-.8 1.7-1.5 2.4-.6.7-1.4 1.2-2.3 1.6-.9.4-1.9.6-3 .6-1.6 0-2.8-.3-3.9-.9-1-.6-1.8-1.4-2.5-2.4-.6-1-1-2.1-1.3-3.4-.2-1.3-.4-2.6-.4-3.9 0-1.3.1-2.6.4-3.8.3-1.3.8-2.4 1.4-3.5.7-1 1.5-1.9 2.5-2.5 1-.6 2.3-1 3.8-1 .9 0 1.7.1 2.5.4.8.3 1.4.6 2 1.1.6.5 1.1 1.1 1.4 1.8.4.7.6 1.5.7 2.5h-4c0-1-.3-1.6-.8-2.1zm-3.5 6.8c-.4.2-.8.5-1 .8-.3.4-.5.8-.6 1.2-.1.5-.2 1-.2 1.5s.1.9.2 1.4c.1.5.4.9.6 1.2.3.4.6.7 1 .9.4.2.9.3 1.4.3.5 0 1-.1 1.3-.3.4-.2.7-.5 1-.9.3-.4.5-.8.6-1.2.1-.5.2-.9.2-1.4 0-.5-.1-1-.2-1.4-.1-.5-.3-.9-.6-1.2-.3-.4-.6-.7-1-.9-.4-.2-.9-.3-1.4-.3-.4 0-.9.1-1.3.3zM36.3 41.3v-3.8l9-12.1H49v12.4h2.7v3.5H49v4.8h-4v-4.8h-8.7zM45 30.7l-5.3 7.2h5.4l-.1-7.2z\"/></symbol><symbol id=\"trumbowyg-back-color\" viewBox=\"0 0 72 72\"><path d=\"M36.5 22.3l-6.3 18.1H43l-6.3-18.1z\"/><path d=\"M9 8.9v54.2h54.1V8.9H9zm39.9 48.2L45 46H28.2l-3.9 11.1h-7.6L32.8 15h7.8l16.2 42.1h-7.9z\"/></symbol><symbol id=\"trumbowyg-fore-color\" viewBox=\"0 0 72 72\"><path d=\"M32 15h7.8L56 57.1h-7.9l-4-11.1H27.4l-4 11.1h-7.6L32 15zm-2.5 25.4h12.9L36 22.3h-.2l-6.3 18.1z\"/></symbol><symbol id=\"trumbowyg-emoji\" viewBox=\"0 0 72 72\"><path d=\"M36.05 9C21.09 9 8.949 21.141 8.949 36.101c0 14.96 12.141 27.101 27.101 27.101 14.96 0 27.101-12.141 27.101-27.101S51.01 9 36.05 9zm9.757 15.095c2.651 0 4.418 1.767 4.418 4.418s-1.767 4.418-4.418 4.418-4.418-1.767-4.418-4.418 1.767-4.418 4.418-4.418zm-19.479 0c2.651 0 4.418 1.767 4.418 4.418s-1.767 4.418-4.418 4.418-4.418-1.767-4.418-4.418 1.767-4.418 4.418-4.418zm9.722 30.436c-14.093 0-16.261-13.009-16.261-13.009h32.522S50.143 54.531 36.05 54.531z\"/></symbol><symbol id=\"trumbowyg-highlight\" viewBox=\"0 0 60 60\"><path d=\"M11 7c0-2.206-1.794-4-4-4S3 4.794 3 7s1.794 4 4 4 4-1.794 4-4zM7 9c-1.103 0-2-.897-2-2s.897-2 2-2 2 .897 2 2-.897 2-2 2zM16 11c2.206 0 4-1.794 4-4s-1.794-4-4-4-4 1.794-4 4 1.794 4 4 4zm0-6c1.103 0 2 .897 2 2s-.897 2-2 2-2-.897-2-2 .897-2 2-2zM25 11c2.206 0 4-1.794 4-4s-1.794-4-4-4-4 1.794-4 4 1.794 4 4 4zm0-6c1.103 0 2 .897 2 2s-.897 2-2 2-2-.897-2-2 .897-2 2-2z\"/><path d=\"M0 0v60h60V0H0zm2 2h56v10H2V2zm0 56V14h5v44H2zm56 0H9V14h49v44z\"/><path d=\"M5 17H4a1 1 0 1 0 0 2h1a1 1 0 1 0 0-2zM5 21H4a1 1 0 1 0 0 2h1a1 1 0 1 0 0-2zM5 25H4a1 1 0 1 0 0 2h1a1 1 0 1 0 0-2zM5 29H4a1 1 0 1 0 0 2h1a1 1 0 1 0 0-2zM5 33H4a1 1 0 1 0 0 2h1a1 1 0 1 0 0-2zM5 37H4a1 1 0 1 0 0 2h1a1 1 0 1 0 0-2zM5 41H4a1 1 0 1 0 0 2h1a1 1 0 1 0 0-2zM5 45H4a1 1 0 1 0 0 2h1a1 1 0 1 0 0-2zM5 49H4a1 1 0 1 0 0 2h1a1 1 0 1 0 0-2zM5 53H4a1 1 0 1 0 0 2h1a1 1 0 1 0 0-2zM13 19h13a1 1 0 1 0 0-2H13a1 1 0 1 0 0 2zM30 19h10a1 1 0 1 0 0-2H30a1 1 0 1 0 0 2zM44 19h2a1 1 0 1 0 0-2h-2a1 1 0 1 0 0 2zM35 22a1 1 0 0 0 1 1h15a1 1 0 1 0 0-2H36a1 1 0 0 0-1 1zM32 21H18a1 1 0 1 0 0 2h14a1 1 0 1 0 0-2zM13 23h1a1 1 0 1 0 0-2h-1a1 1 0 1 0 0 2zM13 27h9a1 1 0 1 0 0-2h-9a1 1 0 1 0 0 2zM26 27h2a1 1 0 1 0 0-2h-2a1 1 0 1 0 0 2zM46 25H32a1 1 0 1 0 0 2h14a1 1 0 1 0 0-2zM13 31h13a1 1 0 1 0 0-2H13a1 1 0 1 0 0 2zM41 30a1 1 0 0 0-1-1H30a1 1 0 1 0 0 2h10a1 1 0 0 0 1-1zM36 35h8a1 1 0 1 0 0-2h-8a1 1 0 1 0 0 2zM17 34a1 1 0 0 0 1 1h14a1 1 0 1 0 0-2H18a1 1 0 0 0-1 1zM13 35h1a1 1 0 1 0 0-2h-1a1 1 0 1 0 0 2zM13 39h9a1 1 0 1 0 0-2h-9a1 1 0 1 0 0 2zM26 39h2a1 1 0 1 0 0-2h-2a1 1 0 1 0 0 2zM31 38a1 1 0 0 0 1 1h15a1 1 0 1 0 0-2H32a1 1 0 0 0-1 1zM13 43h13a1 1 0 1 0 0-2H13a1 1 0 1 0 0 2zM40 41H30a1 1 0 1 0 0 2h10a1 1 0 1 0 0-2zM51 41h-7a1 1 0 1 0 0 2h7a1 1 0 1 0 0-2zM40 45h-4a1 1 0 1 0 0 2h4a1 1 0 1 0 0-2zM17 46a1 1 0 0 0 1 1h14a1 1 0 1 0 0-2H18a1 1 0 0 0-1 1zM13 47h1a1 1 0 1 0 0-2h-1a1 1 0 1 0 0 2zM22 49h-9a1 1 0 1 0 0 2h9a1 1 0 1 0 0-2zM28 49h-2a1 1 0 1 0 0 2h2a1 1 0 1 0 0-2zM39 49h-7a1 1 0 1 0 0 2h7a1 1 0 1 0 0-2zM44 49h-1a1 1 0 1 0 0 2h1a1 1 0 1 0 0-2z\"/></symbol><symbol id=\"trumbowyg-insert-audio\" viewBox=\"0 0 8 8\"><path d=\"M3.344 0L2 2H0v4h2l1.344 2H4V0h-.656zM5 1v1c.152 0 .313.026.469.063H5.5c.86.215 1.5.995 1.5 1.938a1.99 1.99 0 0 1-2 2.001v1a2.988 2.988 0 0 0 3-3 2.988 2.988 0 0 0-3-3zm0 2v2l.25-.031C5.683 4.851 6 4.462 6 4c0-.446-.325-.819-.75-.938v-.031h-.031L5 3z\"/></symbol><symbol id=\"trumbowyg-mathml\" viewBox=\"0 0 445.878 445.878\"><path d=\"M426.024 86.447H209.705l-84.911 298.911c-2.568 7.967-9.854 13.482-18.22 13.771-.236 0-.464.006-.688.006a19.868 19.868 0 0 1-18.436-12.478l-34.714-86.782H19.851C8.884 299.876 0 290.986 0 280.022c0-10.965 8.893-19.854 19.851-19.854H66.18a19.862 19.862 0 0 1 18.436 12.483l19.237 48.09 72.472-260.218a19.855 19.855 0 0 1 18.903-13.781h230.798c10.97 0 19.854 8.89 19.854 19.851s-8.892 19.854-19.856 19.854zm10.699 266.78l-78.259-87.904 74.576-82.783c1.318-1.454 1.638-3.547.857-5.341a4.977 4.977 0 0 0-4.54-2.946h-47.18a4.995 4.995 0 0 0-3.759 1.72l-50.059 58.047-49.674-58.029a4.95 4.95 0 0 0-3.771-1.738H225.58a4.947 4.947 0 0 0-4.521 2.929 4.939 4.939 0 0 0 .824 5.332l73.743 82.81-77.641 87.923a4.977 4.977 0 0 0-.813 5.325 4.978 4.978 0 0 0 4.528 2.92h48.9c1.472 0 2.867-.65 3.807-1.785l51.819-62.181 53.05 62.229a4.972 4.972 0 0 0 3.782 1.743h49.97a4.938 4.938 0 0 0 4.527-2.926 4.966 4.966 0 0 0-.832-5.345z\"/></symbol><symbol id=\"trumbowyg-mention\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M73.309 62.5c-1.53 9.86-8.16 17.85-14.45 17.85-5.61 0-8.5-4.08-8.5-10.54 0-13.089 8.84-24.139 20.06-24.139 2.21 0 3.91.34 5.27.68L73.309 62.5zm14.45 44.2c-6.8 3.57-15.98 5.44-24.65 5.44-25.329 0-43.519-16.15-43.519-44.54 0-32.469 22.78-52.869 48.789-52.869 26.35 0 40.63 17.17 40.63 39.27 0 19.549-9.18 28.899-16.49 28.729-4.76-.17-5.95-4.76-4.25-14.79l5.1-31.449c-4.25-2.38-12.75-4.25-20.23-4.25-24.48 0-39.779 18.87-39.779 39.609 0 13.94 7.99 22.1 19.039 22.1 9.01 0 16.66-4.42 21.93-13.09h.34c.85 9.01 6.63 13.09 14.62 13.09 18.36 0 32.3-15.64 32.3-40.459 0-28.56-21.42-49.13-51.34-49.13C31.83 4.361 6.67 34.451 6.67 69.13c0 33.32 24.82 53.55 53.039 53.55 12.07 0 20.91-1.53 31.11-6.12l-3.06-9.86z\"/></symbol><symbol id=\"trumbowyg-noembed\" viewBox=\"0 0 72 72\"><path d=\"M31.5 33.6V25l11 11-11 11v-8.8z\"/><path d=\"M64 17v38H8V17h56m8-8H0v54h72V9z\"/></symbol><symbol id=\"trumbowyg-preformatted\" viewBox=\"0 0 72 72\"><path d=\"M10.3 33.5c.4 0 .9-.1 1.5-.2s1.2-.3 1.8-.7c.6-.3 1.1-.8 1.5-1.3.4-.5.6-1.3.6-2.1V17.1c0-1.4.3-2.6.8-3.6s1.2-1.9 2-2.5c.8-.7 1.6-1.2 2.5-1.5.9-.3 1.6-.5 2.2-.5h5.3v5.3h-3.2c-.7 0-1.3.1-1.8.4-.4.3-.8.6-1 1-.2.4-.4.9-.4 1.3-.1.5-.1.9-.1 1.4v11.4c0 1.2-.2 2.1-.7 2.9-.5.8-1 1.4-1.7 1.8-.6.4-1.3.8-2 1-.7.2-1.3.3-1.7.4v.1c.5 0 1 .1 1.7.3.7.2 1.3.5 2 .9.6.5 1.2 1.1 1.7 1.9.5.8.7 2 .7 3.4v11.1c0 .4 0 .9.1 1.4.1.5.2.9.4 1.3s.6.7 1 1c.4.3 1 .4 1.8.4h3.2V63h-5.3c-.6 0-1.4-.2-2.2-.5-.9-.3-1.7-.8-2.5-1.5s-1.4-1.5-2-2.5c-.5-1-.8-2.2-.8-3.6V43.5c0-.9-.2-1.7-.6-2.3-.4-.6-.9-1.1-1.5-1.5-.6-.4-1.2-.6-1.8-.7-.6-.1-1.1-.2-1.5-.2v-5.3zM61.8 38.7c-.4 0-1 .1-1.6.2-.6.1-1.2.4-1.8.7-.6.3-1.1.7-1.5 1.3-.4.5-.6 1.3-.6 2.1v12.1c0 1.4-.3 2.6-.8 3.6s-1.2 1.9-2 2.5c-.8.7-1.6 1.2-2.5 1.5-.9.3-1.6.5-2.2.5h-5.3v-5.3h3.2c.7 0 1.3-.1 1.8-.4.4-.3.8-.6 1-1 .2-.4.4-.9.4-1.3.1-.5.1-.9.1-1.4V42.3c0-1.2.2-2.1.7-2.9.5-.8 1-1.4 1.7-1.8.6-.4 1.3-.8 2-1 .7-.2 1.3-.3 1.7-.4v-.1c-.5 0-1-.1-1.7-.3-.7-.2-1.3-.5-2-.9-.6-.4-1.2-1.1-1.7-1.9-.5-.8-.7-2-.7-3.4V18.5c0-.4 0-.9-.1-1.4-.1-.5-.2-.9-.4-1.3s-.6-.7-1-1c-.4-.3-1-.4-1.8-.4h-3.2V9.1h5.3c.6 0 1.4.2 2.2.5.9.3 1.7.8 2.5 1.5s1.4 1.5 2 2.5c.5 1 .8 2.2.8 3.6v11.6c0 .9.2 1.7.6 2.3.4.6.9 1.1 1.5 1.5.6.4 1.2.6 1.8.7.6.1 1.2.2 1.6.2v5.2z\"/></symbol><symbol id=\"trumbowyg-ruby\" viewBox=\"0 0 72 72\"><path d=\"M16.499 24.477h8.018L41.08 67.5H33l-4.04-11.361H11.804L7.764 67.5H0l16.499-43.023zm-2.65 25.907h13.127l-6.438-18.497h-.177l-6.512 18.497zM65.053 16.685c-6.316 1.178-12.025 1.98-17.126 2.408a362.385 362.385 0 0 0-.965 5.833c-.25 1.57-.679 3.907-1.286 7.013 3.033-1.963 5.852-3.266 8.458-3.907 2.639-.642 4.905-.891 6.797-.75 1.891.108 3.746.661 5.566 1.661 1.82.964 3.264 2.408 4.334 4.334 1.104 1.893 1.427 4.088.965 6.584-.466 2.461-1.554 4.494-3.265 6.101-1.679 1.605-3.658 2.783-5.941 3.532-2.283.785-4.853 1.251-7.707 1.391-2.819.144-5.906.161-9.259.056 0-1.642-.287-3.212-.857-4.71l.108-.59c2.711.5 5.246.768 7.601.802 2.39 0 4.529-.195 6.421-.589 1.927-.393 3.605-1.069 5.031-2.031 1.427-.965 2.319-2.319 2.676-4.067.394-1.75.269-3.229-.373-4.443-.644-1.249-1.446-2.213-2.408-2.891-.929-.68-2.161-1.034-3.693-1.071-1.536-.072-3.265.089-5.192.482-1.927.391-3.82 1.14-5.672 2.248a24.308 24.308 0 0 0-4.978 3.907l-4.872-1.981c1.463-5.031 2.355-8.597 2.677-10.703.321-2.105.642-4.067.963-5.887-3.961.25-7.154.411-9.58.481-.215-1.927-.52-3.534-.91-4.817l.32-.32c3.604.32 7.225.446 10.865.375.214-1.355.481-3.103.804-5.245.354-2.175.407-3.621.16-4.336.034-.784.374-1.017 1.017-.695l5.085.749c.428.251.444.573.055.964l-.857.91c-.537 2.89-.981 5.352-1.338 7.385 4.279-.427 9.312-1.393 15.092-2.89l1.284 4.707\"/></symbol><symbol id=\"trumbowyg-col-delete\" viewBox=\"0 0 24 24\"><g transform=\"translate(-326 -532.36)\"><rect width=\"6\" height=\"15\" x=\"335\" y=\"537.36\" fill=\"#ed5565\" stroke=\"#000\" stroke-linejoin=\"round\" stroke-linecap=\"round\" stroke-width=\".837\" rx=\".646\"/><path d=\"M347.58 536.498c-.051-.618-.55-1.138-1.178-1.138H329.6c-.628 0-1.127.52-1.18 1.138h-.02v15.663a1.2 1.2 0 0 0 1.2 1.2h16.801a1.2 1.2 0 0 0 1.2-1.2v-15.663h-.021M334.4 552.16h-4.8v-3.6h4.8v3.6m0-4.7h-4.8v-3.7h4.8v3.7m0-4.9h-4.8v-3.601h4.8v3.6m6 9.601h-4.8v-3.6h4.8v3.6m0-4.7h-4.8v-3.7h4.8v3.7m0-4.9h-4.8v-3.601h4.8v3.6m6.001 9.601h-4.8v-3.6h4.8v3.6m0-4.7h-4.8v-3.7h4.8v3.7m0-4.9h-4.8v-3.601h4.8v3.6\"/></g></symbol><symbol id=\"trumbowyg-col-left\" viewBox=\"0 0 24 24\"><g transform=\"translate(-326 -532.36)\"><rect width=\"6\" height=\"15\" x=\"329\" y=\"537.36\" fill=\"#1ab394\" stroke=\"#000\" stroke-linejoin=\"round\" stroke-linecap=\"round\" stroke-width=\".837\" rx=\".646\"/><path d=\"M347.58 536.498c-.051-.618-.55-1.138-1.178-1.138H329.6c-.628 0-1.127.52-1.18 1.138h-.02v15.663a1.2 1.2 0 0 0 1.2 1.2h16.801a1.2 1.2 0 0 0 1.2-1.2v-15.663h-.021M334.4 552.16h-4.8v-3.6h4.8v3.6m0-4.7h-4.8v-3.7h4.8v3.7m0-4.9h-4.8v-3.601h4.8v3.6m6 9.601h-4.8v-3.6h4.8v3.6m0-4.7h-4.8v-3.7h4.8v3.7m0-4.9h-4.8v-3.601h4.8v3.6m6.001 9.601h-4.8v-3.6h4.8v3.6m0-4.7h-4.8v-3.7h4.8v3.7m0-4.9h-4.8v-3.601h4.8v3.6\"/></g></symbol><symbol id=\"trumbowyg-col-right\" viewBox=\"0 0 24 24\"><g transform=\"matrix(-1 0 0 1 350 -532.36)\"><rect y=\"537.36\" x=\"329\" height=\"15\" width=\"6\" fill=\"#1ab394\" stroke=\"#000\" stroke-linejoin=\"round\" stroke-linecap=\"round\" stroke-width=\".837\" rx=\".646\"/><path d=\"M347.58 536.498c-.051-.618-.55-1.138-1.178-1.138H329.6c-.628 0-1.127.52-1.18 1.138h-.02v15.663a1.2 1.2 0 0 0 1.2 1.2h16.801a1.2 1.2 0 0 0 1.2-1.2v-15.663h-.021M334.4 552.16h-4.8v-3.6h4.8v3.6m0-4.7h-4.8v-3.7h4.8v3.7m0-4.9h-4.8v-3.601h4.8v3.6m6 9.601h-4.8v-3.6h4.8v3.6m0-4.7h-4.8v-3.7h4.8v3.7m0-4.9h-4.8v-3.601h4.8v3.6m6.001 9.601h-4.8v-3.6h4.8v3.6m0-4.7h-4.8v-3.7h4.8v3.7m0-4.9h-4.8v-3.601h4.8v3.6\"/></g></symbol><symbol id=\"trumbowyg-row-above\" viewBox=\"0 0 24 24\"><rect y=\"-347\" x=\"537.06\" height=\"18\" width=\"6\" transform=\"matrix(0 1 1 0 350 -532.36)\" fill=\"#1ab394\" stroke=\"#000\" stroke-linejoin=\"round\" stroke-linecap=\"round\" stroke-width=\".917\" rx=\".776\"/><path d=\"M2.42 4.138C2.47 3.52 2.97 3 3.598 3H20.4c.628 0 1.127.52 1.18 1.138h.02V19.8a1.2 1.2 0 0 1-1.2 1.2H3.599a1.2 1.2 0 0 1-1.2-1.2V4.138h.021M15.6 19.8h4.8v-3.6h-4.8v3.6m0-4.7h4.8v-3.7h-4.8v3.7m0-4.9h4.8V6.6h-4.8v3.6m-6 9.601h4.8v-3.6H9.6v3.6m0-4.7h4.8v-3.7H9.6v3.7m0-4.9h4.8V6.6H9.6v3.6m-6.001 9.601h4.8v-3.6H3.6v3.6m0-4.7h4.8v-3.7H3.6v3.7m0-4.9h4.8V6.6H3.6v3.6\"/></symbol><symbol id=\"trumbowyg-row-below\" viewBox=\"0 0 24 24\"><rect y=\"-347.06\" x=\"548.4\" height=\"18.13\" width=\"4.427\" transform=\"matrix(0 1 1 0 350 -532.36)\" fill=\"#1ab394\" stroke=\"#000\" stroke-linejoin=\"round\" stroke-linecap=\"round\" stroke-width=\".79\" rx=\".781\"/><path d=\"M2.42 4.138C2.47 3.52 2.97 3 3.598 3H20.4c.628 0 1.127.52 1.18 1.138h.02V19.8a1.2 1.2 0 0 1-1.2 1.2H3.599a1.2 1.2 0 0 1-1.2-1.2V4.138h.021M15.6 19.8h4.8v-3.6h-4.8v3.6m0-4.7h4.8v-3.7h-4.8v3.7m0-4.9h4.8V6.6h-4.8v3.6m-6 9.601h4.8v-3.6H9.6v3.6m0-4.7h4.8v-3.7H9.6v3.7m0-4.9h4.8V6.6H9.6v3.6m-6.001 9.601h4.8v-3.6H3.6v3.6m0-4.7h4.8v-3.7H3.6v3.7m0-4.9h4.8V6.6H3.6v3.6\"/></symbol><symbol id=\"trumbowyg-row-delete\" viewBox=\"0 0 24 24\"><rect width=\"5\" height=\"18\" x=\"543.36\" y=\"-347\" transform=\"rotate(90 103.18 -429.18)\" fill=\"#ed5565\" rx=\".776\"/><path d=\"M21.58 4.136c-.051-.618-.55-1.138-1.178-1.138H3.6c-.628 0-1.127.52-1.18 1.138H2.4v15.663A1.2 1.2 0 0 0 3.6 21h16.801a1.2 1.2 0 0 0 1.2-1.2V4.136h-.021M8.4 19.799H3.6v-3.6h4.8v3.6m0-4.7H3.6v-3.7h4.8v3.7m0-4.9H3.6V6.597h4.8v3.6m6 9.601H9.6v-3.6h4.8v3.6m0-4.7H9.6v-3.7h4.8v3.7m0-4.9H9.6V6.597h4.8v3.6m6.001 9.601h-4.8v-3.6h4.8v3.6m0-4.7h-4.8v-3.7h4.8v3.7m0-4.9h-4.8V6.597h4.8v3.6\"/></symbol><symbol id=\"trumbowyg-table-delete\" viewBox=\"0 0 24 24\"><rect y=\"-347\" x=\"537.06\" height=\"18\" width=\"6\" transform=\"matrix(0 1 1 0 350 -532.36)\" fill=\"#ed5565\" stroke=\"#000\" stroke-linejoin=\"round\" stroke-linecap=\"round\" stroke-width=\".917\" rx=\".776\"/><rect width=\"5\" height=\"18\" x=\"543.36\" y=\"-347\" transform=\"rotate(90 103.18 -429.18)\" fill=\"#ed5565\" rx=\".776\"/><rect y=\"-347.06\" x=\"548.4\" height=\"18.13\" width=\"4.427\" transform=\"matrix(0 1 1 0 350 -532.36)\" fill=\"#ed5565\" stroke=\"#000\" stroke-linejoin=\"round\" stroke-linecap=\"round\" stroke-width=\".79\" rx=\".781\"/><path d=\"M21.58 4.136c-.051-.618-.55-1.138-1.178-1.138H3.6c-.628 0-1.127.52-1.18 1.138H2.4v15.663A1.2 1.2 0 0 0 3.6 21h16.801a1.2 1.2 0 0 0 1.2-1.2V4.136h-.021M8.4 19.799H3.6v-3.6h4.8v3.6m0-4.7H3.6v-3.7h4.8v3.7m0-4.9H3.6V6.597h4.8v3.6m6 9.601H9.6v-3.6h4.8v3.6m0-4.7H9.6v-3.7h4.8v3.7m0-4.9H9.6V6.597h4.8v3.6m6.001 9.601h-4.8v-3.6h4.8v3.6m0-4.7h-4.8v-3.7h4.8v3.7m0-4.9h-4.8V6.597h4.8v3.6\"/></symbol><symbol id=\"trumbowyg-upload\" viewBox=\"0 0 72 72\"><path d=\"M64 27v28H8V27H0v36h72V27h-8z\"/><path d=\"M32.1 6.7h8v33.6h-8z\"/><path d=\"M48 35.9L36 49.6 24 36h24z\"/></symbol></svg>");
            System.out.println("write to file success : " + file.getPath());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeJsPlusTrumbowygCss(String htmlPath, String serverUrl) {
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/content/page-common/css");
            folder.mkdirs();
            file = new File(htmlPath + "/content/page-common/css/trumbowyg.css");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            bufferedWriter.write("#trumbowyg-icons, #trumbowyg-icons svg {\n" +
                    "    height: 0;\n" +
                    "    width: 0\n" +
                    "}\n" +
                    "\n" +
                    "#trumbowyg-icons {\n" +
                    "    overflow: hidden;\n" +
                    "    visibility: hidden\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-box *, .trumbowyg-box ::after, .trumbowyg-box ::before {\n" +
                    "    box-sizing: border-box\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-box svg {\n" +
                    "    width: 17px;\n" +
                    "    height: 100%;\n" +
                    "    fill: #222\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-box, .trumbowyg-editor {\n" +
                    "    display: block;\n" +
                    "    position: relative;\n" +
                    "    border: 1px solid #DDD;\n" +
                    "    width: 100%;\n" +
                    "    min-height: 300px;\n" +
                    "    margin: 17px auto\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-box .trumbowyg-editor {\n" +
                    "    margin: 0 auto\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-box.trumbowyg-fullscreen {\n" +
                    "    background: #FEFEFE;\n" +
                    "    border: none !important\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor, .trumbowyg-textarea {\n" +
                    "    position: relative;\n" +
                    "    box-sizing: border-box;\n" +
                    "    padding: 20px;\n" +
                    "    min-height: 300px;\n" +
                    "    width: 100%;\n" +
                    "    border-style: none;\n" +
                    "    resize: none;\n" +
                    "    outline: 0;\n" +
                    "    overflow: auto\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor.trumbowyg-autogrow-on-enter, .trumbowyg-textarea.trumbowyg-autogrow-on-enter {\n" +
                    "    transition: height .3s ease-out\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-box-blur .trumbowyg-editor *, .trumbowyg-box-blur .trumbowyg-editor::before {\n" +
                    "    color: transparent !important;\n" +
                    "    text-shadow: 0 0 7px #333\n" +
                    "}\n" +
                    "\n" +
                    "@media screen and (min-width: 0 \\0\n" +
                    ") {\n" +
                    "    .trumbowyg-box-blur .trumbowyg-editor *, .trumbowyg-box-blur .trumbowyg-editor::before {\n" +
                    "        color: rgba(200, 200, 200, .6) !important\n" +
                    "    }\n" +
                    "}\n" +
                    "\n" +
                    "@supports (-ms-accelerator:true) {\n" +
                    "    .trumbowyg-box-blur .trumbowyg-editor *, .trumbowyg-box-blur .trumbowyg-editor::before {\n" +
                    "        color: rgba(200, 200, 200, .6) !important\n" +
                    "    }\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-box-blur .trumbowyg-editor hr, .trumbowyg-box-blur .trumbowyg-editor img {\n" +
                    "    opacity: .2\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-textarea {\n" +
                    "    position: relative;\n" +
                    "    display: block;\n" +
                    "    overflow: auto;\n" +
                    "    border: none;\n" +
                    "    font-size: 14px;\n" +
                    "    font-family: Inconsolata, Consolas, Courier, \"Courier New\", sans-serif;\n" +
                    "    line-height: 18px\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-box.trumbowyg-editor-visible .trumbowyg-textarea {\n" +
                    "    height: 1px !important;\n" +
                    "    width: 25%;\n" +
                    "    min-height: 0 !important;\n" +
                    "    padding: 0 !important;\n" +
                    "    background: 0 0;\n" +
                    "    opacity: 0 !important\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-box.trumbowyg-editor-hidden .trumbowyg-textarea {\n" +
                    "    display: block\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-box.trumbowyg-editor-hidden .trumbowyg-editor {\n" +
                    "    display: none\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-box.trumbowyg-disabled .trumbowyg-textarea {\n" +
                    "    opacity: .8;\n" +
                    "    background: 0 0\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor[contenteditable=true]:empty:not(:focus)::before {\n" +
                    "    content: attr(placeholder);\n" +
                    "    color: #999;\n" +
                    "    pointer-events: none\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-button-pane {\n" +
                    "    width: 100%;\n" +
                    "    min-height: 36px;\n" +
                    "    background: #ecf0f1;\n" +
                    "    border-bottom: 1px solid #d7e0e2;\n" +
                    "    margin: 0;\n" +
                    "    padding: 0 5px;\n" +
                    "    position: relative;\n" +
                    "    list-style-type: none;\n" +
                    "    line-height: 10px;\n" +
                    "    backface-visibility: hidden;\n" +
                    "    z-index: 11\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-button-pane::after {\n" +
                    "    content: \" \";\n" +
                    "    display: block;\n" +
                    "    position: absolute;\n" +
                    "    top: 36px;\n" +
                    "    left: 0;\n" +
                    "    right: 0;\n" +
                    "    width: 100%;\n" +
                    "    height: 1px;\n" +
                    "    background: #d7e0e2\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-button-pane .trumbowyg-button-group {\n" +
                    "    display: inline-block\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-button-pane .trumbowyg-button-group .trumbowyg-fullscreen-button svg {\n" +
                    "    color: transparent\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-button-pane .trumbowyg-button-group::after {\n" +
                    "    content: \" \";\n" +
                    "    display: inline-block;\n" +
                    "    width: 1px;\n" +
                    "    background: #d7e0e2;\n" +
                    "    margin: 0 5px;\n" +
                    "    height: 35px;\n" +
                    "    vertical-align: top\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-button-pane .trumbowyg-button-group:last-child::after {\n" +
                    "    content: none\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-button-pane button {\n" +
                    "    display: inline-block;\n" +
                    "    position: relative;\n" +
                    "    width: 35px;\n" +
                    "    height: 35px;\n" +
                    "    padding: 1px 6px !important;\n" +
                    "    margin-bottom: 1px;\n" +
                    "    overflow: hidden;\n" +
                    "    border: none;\n" +
                    "    cursor: pointer;\n" +
                    "    background: 0 0;\n" +
                    "    vertical-align: middle;\n" +
                    "    transition: background-color 150ms, opacity 150ms\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-button-pane button.trumbowyg-textual-button {\n" +
                    "    width: auto;\n" +
                    "    line-height: 35px;\n" +
                    "    -webkit-user-select: none;\n" +
                    "    -moz-user-select: none;\n" +
                    "    -ms-user-select: none;\n" +
                    "    user-select: none\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-button-pane button.trumbowyg-disable, .trumbowyg-button-pane.trumbowyg-disable button:not(.trumbowyg-not-disable):not(.trumbowyg-active), .trumbowyg-disabled .trumbowyg-button-pane button:not(.trumbowyg-not-disable):not(.trumbowyg-viewHTML-button) {\n" +
                    "    opacity: .2;\n" +
                    "    cursor: default\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-button-pane.trumbowyg-disable .trumbowyg-button-group::before, .trumbowyg-disabled .trumbowyg-button-pane .trumbowyg-button-group::before {\n" +
                    "    background: #e3e9eb\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-button-pane button.trumbowyg-active, .trumbowyg-button-pane button:not(.trumbowyg-disable):focus, .trumbowyg-button-pane button:not(.trumbowyg-disable):hover {\n" +
                    "    background-color: #FFF;\n" +
                    "    outline: 0\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-button-pane .trumbowyg-open-dropdown::after {\n" +
                    "    display: block;\n" +
                    "    content: \" \";\n" +
                    "    position: absolute;\n" +
                    "    top: 25px;\n" +
                    "    right: 3px;\n" +
                    "    height: 0;\n" +
                    "    width: 0;\n" +
                    "    border: 3px solid transparent;\n" +
                    "    border-top-color: #555\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-button-pane .trumbowyg-open-dropdown.trumbowyg-textual-button {\n" +
                    "    padding-left: 10px !important;\n" +
                    "    padding-right: 18px !important\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-button-pane .trumbowyg-open-dropdown.trumbowyg-textual-button::after {\n" +
                    "    top: 17px;\n" +
                    "    right: 7px\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal, .trumbowyg-modal-box {\n" +
                    "    top: 0;\n" +
                    "    left: 50%;\n" +
                    "    transform: translateX(-50%);\n" +
                    "    backface-visibility: hidden;\n" +
                    "    position: absolute\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-button-pane .trumbowyg-right {\n" +
                    "    float: right\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dropdown {\n" +
                    "    width: 200px;\n" +
                    "    border: 1px solid #ecf0f1;\n" +
                    "    padding: 5px 0;\n" +
                    "    border-top: none;\n" +
                    "    background: #FFF;\n" +
                    "    margin-left: -1px;\n" +
                    "    box-shadow: rgba(0, 0, 0, .1) 0 2px 3px;\n" +
                    "    z-index: 12\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dropdown button {\n" +
                    "    display: block;\n" +
                    "    width: 100%;\n" +
                    "    height: 35px;\n" +
                    "    line-height: 35px;\n" +
                    "    text-decoration: none;\n" +
                    "    background: #FFF;\n" +
                    "    padding: 0 10px;\n" +
                    "    color: #333 !important;\n" +
                    "    border: none;\n" +
                    "    cursor: pointer;\n" +
                    "    text-align: left;\n" +
                    "    font-size: 15px;\n" +
                    "    transition: all 150ms\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dropdown button:focus, .trumbowyg-dropdown button:hover {\n" +
                    "    background: #ecf0f1\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dropdown button svg {\n" +
                    "    float: left;\n" +
                    "    margin-right: 14px\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal {\n" +
                    "    max-width: 520px;\n" +
                    "    width: 100%;\n" +
                    "    height: 350px;\n" +
                    "    z-index: 12;\n" +
                    "    overflow: hidden\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box {\n" +
                    "    max-width: 500px;\n" +
                    "    width: calc(100% - 20px);\n" +
                    "    padding-bottom: 45px;\n" +
                    "    z-index: 1;\n" +
                    "    background-color: #FFF;\n" +
                    "    text-align: center;\n" +
                    "    font-size: 14px;\n" +
                    "    box-shadow: rgba(0, 0, 0, .2) 0 2px 3px\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box .trumbowyg-modal-title {\n" +
                    "    font-size: 24px;\n" +
                    "    font-weight: 700;\n" +
                    "    margin: 0 0 20px;\n" +
                    "    padding: 15px 0 13px;\n" +
                    "    display: block;\n" +
                    "    border-bottom: 1px solid #EEE;\n" +
                    "    color: #333;\n" +
                    "    background: #fbfcfc\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box .trumbowyg-progress {\n" +
                    "    width: 100%;\n" +
                    "    height: 3px;\n" +
                    "    position: absolute;\n" +
                    "    top: 58px\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box .trumbowyg-progress .trumbowyg-progress-bar {\n" +
                    "    background: #2BC06A;\n" +
                    "    width: 0;\n" +
                    "    height: 100%;\n" +
                    "    transition: width 150ms linear\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box label {\n" +
                    "    display: block;\n" +
                    "    position: relative;\n" +
                    "    margin: 15px 12px;\n" +
                    "    height: 29px;\n" +
                    "    line-height: 29px;\n" +
                    "    overflow: hidden\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box label .trumbowyg-input-infos {\n" +
                    "    display: block;\n" +
                    "    text-align: left;\n" +
                    "    height: 25px;\n" +
                    "    line-height: 25px;\n" +
                    "    transition: all 150ms\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box label .trumbowyg-input-infos span {\n" +
                    "    display: block;\n" +
                    "    color: #69878f;\n" +
                    "    background-color: #fbfcfc;\n" +
                    "    border: 1px solid #DEDEDE;\n" +
                    "    padding: 0 7px;\n" +
                    "    width: 150px\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box label .trumbowyg-input-infos span.trumbowyg-msg-error {\n" +
                    "    color: #e74c3c\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box label.trumbowyg-input-error input, .trumbowyg-modal-box label.trumbowyg-input-error textarea {\n" +
                    "    border: 1px solid #e74c3c\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box label.trumbowyg-input-error .trumbowyg-input-infos {\n" +
                    "    margin-top: -27px\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box label input {\n" +
                    "    position: absolute;\n" +
                    "    top: 0;\n" +
                    "    right: 0;\n" +
                    "    height: 27px;\n" +
                    "    line-height: 27px;\n" +
                    "    border: 1px solid #DEDEDE;\n" +
                    "    background: #fff;\n" +
                    "    font-size: 14px;\n" +
                    "    max-width: 330px;\n" +
                    "    width: 70%;\n" +
                    "    padding: 0 7px;\n" +
                    "    transition: all 150ms\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box label input:focus, .trumbowyg-modal-box label input:hover {\n" +
                    "    outline: 0;\n" +
                    "    border: 1px solid #95a5a6\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box label input:focus {\n" +
                    "    background: #fbfcfc\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box label input[type=checkbox] {\n" +
                    "    left: 5px;\n" +
                    "    top: 5px;\n" +
                    "    right: auto\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box label input[type=checkbox] + .trumbowyg-input-infos span {\n" +
                    "    width: auto;\n" +
                    "    padding-left: 25px\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box .error {\n" +
                    "    margin-top: 25px;\n" +
                    "    display: block;\n" +
                    "    color: red\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box .trumbowyg-modal-button {\n" +
                    "    position: absolute;\n" +
                    "    bottom: 10px;\n" +
                    "    right: 0;\n" +
                    "    text-decoration: none;\n" +
                    "    color: #FFF;\n" +
                    "    display: block;\n" +
                    "    width: 100px;\n" +
                    "    height: 35px;\n" +
                    "    line-height: 33px;\n" +
                    "    margin: 0 10px;\n" +
                    "    background-color: #333;\n" +
                    "    border: none;\n" +
                    "    cursor: pointer;\n" +
                    "    font-family: \"Trebuchet MS\", Helvetica, Verdana, sans-serif;\n" +
                    "    font-size: 16px;\n" +
                    "    transition: all 150ms\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit {\n" +
                    "    right: 110px;\n" +
                    "    background: #2bc06a\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:focus, .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:hover {\n" +
                    "    background: #40d47e;\n" +
                    "    outline: 0\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:active {\n" +
                    "    background: #25a25a\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset {\n" +
                    "    color: #555;\n" +
                    "    background: #e6e6e6\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:focus, .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:hover {\n" +
                    "    background: #fbfbfb;\n" +
                    "    outline: 0\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:active {\n" +
                    "    background: #d5d5d5\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-overlay {\n" +
                    "    position: absolute;\n" +
                    "    background-color: rgba(255, 255, 255, .5);\n" +
                    "    height: 100%;\n" +
                    "    width: 100%;\n" +
                    "    left: 0;\n" +
                    "    display: none;\n" +
                    "    top: 0;\n" +
                    "    z-index: 10\n" +
                    "}\n" +
                    "\n" +
                    "body.trumbowyg-body-fullscreen {\n" +
                    "    overflow: hidden\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-fullscreen {\n" +
                    "    position: fixed;\n" +
                    "    top: 0;\n" +
                    "    left: 0;\n" +
                    "    width: 100%;\n" +
                    "    height: 100%;\n" +
                    "    margin: 0;\n" +
                    "    padding: 0;\n" +
                    "    z-index: 99999\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-fullscreen .trumbowyg-editor, .trumbowyg-fullscreen.trumbowyg-box {\n" +
                    "    border: none\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-fullscreen .trumbowyg-editor, .trumbowyg-fullscreen .trumbowyg-textarea {\n" +
                    "    height: calc(100% - 37px) !important;\n" +
                    "    overflow: auto\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-fullscreen .trumbowyg-overlay {\n" +
                    "    height: 100% !important\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-fullscreen .trumbowyg-button-group .trumbowyg-fullscreen-button svg {\n" +
                    "    color: #222;\n" +
                    "    fill: transparent\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor embed, .trumbowyg-editor img, .trumbowyg-editor object, .trumbowyg-editor video {\n" +
                    "    max-width: 100%\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor img, .trumbowyg-editor video {\n" +
                    "    height: auto\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor img {\n" +
                    "    cursor: move\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor.trumbowyg-reset-css {\n" +
                    "    background: #FEFEFE !important;\n" +
                    "    font-family: \"Trebuchet MS\", Helvetica, Verdana, sans-serif !important;\n" +
                    "    font-size: 14px !important;\n" +
                    "    line-height: 1.45em !important;\n" +
                    "    color: #333\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor.trumbowyg-reset-css a {\n" +
                    "    color: #15c !important;\n" +
                    "    text-decoration: underline !important\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor.trumbowyg-reset-css blockquote, .trumbowyg-editor.trumbowyg-reset-css div, .trumbowyg-editor.trumbowyg-reset-css ol, .trumbowyg-editor.trumbowyg-reset-css p, .trumbowyg-editor.trumbowyg-reset-css ul {\n" +
                    "    box-shadow: none !important;\n" +
                    "    background: 0 0 !important;\n" +
                    "    margin: 0 0 15px !important;\n" +
                    "    line-height: 1.4em !important;\n" +
                    "    font-family: \"Trebuchet MS\", Helvetica, Verdana, sans-serif !important;\n" +
                    "    font-size: 14px !important;\n" +
                    "    border: none\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor.trumbowyg-reset-css hr, .trumbowyg-editor.trumbowyg-reset-css iframe, .trumbowyg-editor.trumbowyg-reset-css object {\n" +
                    "    margin-bottom: 15px !important\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor.trumbowyg-reset-css blockquote {\n" +
                    "    margin-left: 32px !important;\n" +
                    "    font-style: italic !important;\n" +
                    "    color: #555\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor.trumbowyg-reset-css ul {\n" +
                    "    list-style: disc\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor.trumbowyg-reset-css ol, .trumbowyg-editor.trumbowyg-reset-css ul {\n" +
                    "    padding-left: 20px !important\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor.trumbowyg-reset-css ol ol, .trumbowyg-editor.trumbowyg-reset-css ol ul, .trumbowyg-editor.trumbowyg-reset-css ul ol, .trumbowyg-editor.trumbowyg-reset-css ul ul {\n" +
                    "    border: none;\n" +
                    "    margin: 2px !important;\n" +
                    "    padding: 0 0 0 24px !important\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor.trumbowyg-reset-css hr {\n" +
                    "    display: block;\n" +
                    "    height: 1px;\n" +
                    "    border: none;\n" +
                    "    border-top: 1px solid #CCC\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor.trumbowyg-reset-css h1, .trumbowyg-editor.trumbowyg-reset-css h2, .trumbowyg-editor.trumbowyg-reset-css h3, .trumbowyg-editor.trumbowyg-reset-css h4 {\n" +
                    "    color: #111;\n" +
                    "    background: 0 0;\n" +
                    "    margin: 0 !important;\n" +
                    "    padding: 0 !important;\n" +
                    "    font-weight: 700\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor.trumbowyg-reset-css h1 {\n" +
                    "    font-size: 32px !important;\n" +
                    "    line-height: 38px !important;\n" +
                    "    margin-bottom: 20px !important\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor.trumbowyg-reset-css h2 {\n" +
                    "    font-size: 26px !important;\n" +
                    "    line-height: 34px !important;\n" +
                    "    margin-bottom: 15px !important\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor.trumbowyg-reset-css h3 {\n" +
                    "    font-size: 22px !important;\n" +
                    "    line-height: 28px !important;\n" +
                    "    margin-bottom: 7px !important\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-editor.trumbowyg-reset-css h4 {\n" +
                    "    font-size: 16px !important;\n" +
                    "    line-height: 22px !important;\n" +
                    "    margin-bottom: 7px !important\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-textarea {\n" +
                    "    background: #111;\n" +
                    "    color: #ddd\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-box {\n" +
                    "    border: 1px solid #343434\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-box.trumbowyg-fullscreen {\n" +
                    "    background: #111\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *, .trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before {\n" +
                    "    text-shadow: 0 0 7px #ccc\n" +
                    "}\n" +
                    "\n" +
                    "@media screen and (min-width: 0 \\0\n" +
                    ") {\n" +
                    "    .trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *, .trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before {\n" +
                    "        color: rgba(20, 20, 20, .6) !important\n" +
                    "    }\n" +
                    "}\n" +
                    "\n" +
                    "@supports (-ms-accelerator:true) {\n" +
                    "    .trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *, .trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before {\n" +
                    "        color: rgba(20, 20, 20, .6) !important\n" +
                    "    }\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-box svg {\n" +
                    "    fill: #ecf0f1;\n" +
                    "    color: #ecf0f1\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-button-pane {\n" +
                    "    background-color: #222;\n" +
                    "    border-bottom-color: #343434\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-button-pane::after {\n" +
                    "    background: #343434\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-button-pane .trumbowyg-button-group:not(:empty)::after {\n" +
                    "    background-color: #343434\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-button-pane .trumbowyg-button-group:not(:empty) .trumbowyg-fullscreen-button svg {\n" +
                    "    color: transparent\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-button-pane.trumbowyg-disable .trumbowyg-button-group::after {\n" +
                    "    background-color: #2a2a2a\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-button-pane button.trumbowyg-active, .trumbowyg-dark .trumbowyg-button-pane button:not(.trumbowyg-disable):focus, .trumbowyg-dark .trumbowyg-button-pane button:not(.trumbowyg-disable):hover {\n" +
                    "    background-color: #333\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-button-pane .trumbowyg-open-dropdown::after {\n" +
                    "    border-top-color: #fff\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-fullscreen .trumbowyg-button-group .trumbowyg-fullscreen-button svg {\n" +
                    "    color: #ecf0f1;\n" +
                    "    fill: transparent\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-dropdown {\n" +
                    "    border-color: #222;\n" +
                    "    background: #333;\n" +
                    "    box-shadow: rgba(0, 0, 0, .3) 0 2px 3px\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-dropdown button {\n" +
                    "    background: #333;\n" +
                    "    color: #fff !important\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-dropdown button:focus, .trumbowyg-dark .trumbowyg-dropdown button:hover {\n" +
                    "    background: #222\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-modal-box {\n" +
                    "    background-color: #222\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-title {\n" +
                    "    border-bottom: 1px solid #555;\n" +
                    "    color: #fff;\n" +
                    "    background: #3c3c3c\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-modal-box label {\n" +
                    "    display: block;\n" +
                    "    position: relative;\n" +
                    "    margin: 15px 12px;\n" +
                    "    height: 27px;\n" +
                    "    line-height: 27px;\n" +
                    "    overflow: hidden\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-modal-box label .trumbowyg-input-infos span {\n" +
                    "    color: #eee;\n" +
                    "    background-color: #2f2f2f;\n" +
                    "    border-color: #222\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-modal-box label .trumbowyg-input-infos span.trumbowyg-msg-error {\n" +
                    "    color: #e74c3c\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-modal-box label.trumbowyg-input-error input, .trumbowyg-dark .trumbowyg-modal-box label.trumbowyg-input-error textarea {\n" +
                    "    border-color: #e74c3c\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-modal-box label input {\n" +
                    "    border-color: #222;\n" +
                    "    color: #eee;\n" +
                    "    background: #333\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-modal-box label input:focus, .trumbowyg-dark .trumbowyg-modal-box label input:hover {\n" +
                    "    border-color: #626262\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-modal-box label input:focus {\n" +
                    "    background-color: #2f2f2f\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit {\n" +
                    "    background: #1b7943\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:focus, .trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:hover {\n" +
                    "    background: #25a25a\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:active {\n" +
                    "    background: #176437\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset {\n" +
                    "    background: #333;\n" +
                    "    color: #ccc\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:focus, .trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:hover {\n" +
                    "    background: #444\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:active {\n" +
                    "    background: #111\n" +
                    "}\n" +
                    "\n" +
                    ".trumbowyg-dark .trumbowyg-overlay {\n" +
                    "    background-color: rgba(15, 15, 15, .6)\n" +
                    "}");
            System.out.println("write to file success : " + file.getPath());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeJsPlusTrumbowygJs(String htmlPath, String serverUrl) {
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/content/page-common/js");
            folder.mkdirs();
            file = new File(htmlPath + "/content/page-common/js/trumbowyg.js");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            bufferedWriter.write("jQuery.trumbowyg={langs:{en:{viewHTML:\"View HTML\",undo:\"Undo\",redo:\"Redo\",formatting:\"Formatting\",p:\"Paragraph\",blockquote:\"Quote\",code:\"Code\",header:\"Header\",bold:\"Bold\",italic:\"Italic\",strikethrough:\"Stroke\",underline:\"Underline\",strong:\"Strong\",em:\"Emphasis\",del:\"Deleted\",superscript:\"Superscript\",subscript:\"Subscript\",unorderedList:\"Unordered list\",orderedList:\"Ordered list\",insertImage:\"Insert Image\",link:\"Link\",createLink:\"Insert link\",unlink:\"Remove link\",justifyLeft:\"Align Left\",justifyCenter:\"Align Center\",justifyRight:\"Align Right\",justifyFull:\"Align Justify\",horizontalRule:\"Insert horizontal rule\",removeformat:\"Remove format\",fullscreen:\"Fullscreen\",close:\"Close\",submit:\"Confirm\",reset:\"Cancel\",required:\"Required\",description:\"Description\",title:\"Title\",text:\"Text\",target:\"Target\",width:\"Width\"}},plugins:{},svgPath:null,hideButtonTexts:null},Object.defineProperty(jQuery.trumbowyg,\"defaultOptions\",{value:{lang:\"en\",fixedBtnPane:!1,fixedFullWidth:!1,autogrow:!1,autogrowOnEnter:!1,imageWidthModalEdit:!1,prefix:\"trumbowyg-\",semantic:!0,resetCss:!1,removeformatPasted:!1,tagsToRemove:[],btns:[[\"viewHTML\"],[\"undo\",\"redo\"],[\"formatting\"],[\"strong\",\"em\",\"del\"],[\"superscript\",\"subscript\"],[\"link\"],[\"insertImage\"],[\"justifyLeft\",\"justifyCenter\",\"justifyRight\",\"justifyFull\"],[\"unorderedList\",\"orderedList\"],[\"horizontalRule\"],[\"removeformat\"],[\"fullscreen\"]],btnsDef:{},inlineElementsSelector:\"a,abbr,acronym,b,caption,cite,code,col,dfn,dir,dt,dd,em,font,hr,i,kbd,li,q,span,strikeout,strong,sub,sup,u\",pasteHandlers:[],plugins:{},urlProtocol:!1,minimalLinks:!1},writable:!1,enumerable:!0,configurable:!1}),function(e,t,n,a){\"use strict\";var o=\"tbwconfirm\",r=\"tbwcancel\";a.fn.trumbowyg=function(e,t){var n=\"trumbowyg\";if(e===Object(e)||!e)return this.each(function(){a(this).data(n)||a(this).data(n,new i(this,e))});if(1===this.length)try{var o=a(this).data(n);switch(e){case\"execCmd\":return o.execCmd(t.cmd,t.param,t.forceCss);case\"openModal\":return o.openModal(t.title,t.content);case\"closeModal\":return o.closeModal();case\"openModalInsert\":return o.openModalInsert(t.title,t.fields,t.callback);case\"saveRange\":return o.saveRange();case\"getRange\":return o.range;case\"getRangeText\":return o.getRangeText();case\"restoreRange\":return o.restoreRange();case\"enable\":return o.setDisabled(!1);case\"disable\":return o.setDisabled(!0);case\"toggle\":return o.toggle();case\"destroy\":return o.destroy();case\"empty\":return o.empty();case\"html\":return o.html(t)}}catch(r){}return!1};var i=function(o,r){var i=this,s=\"trumbowyg-icons\",l=a.trumbowyg;i.doc=o.ownerDocument||n,i.$ta=a(o),i.$c=a(o),r=r||{},null!=r.lang||null!=l.langs[r.lang]?i.lang=a.extend(!0,{},l.langs.en,l.langs[r.lang]):i.lang=l.langs.en,i.hideButtonTexts=null!=l.hideButtonTexts?l.hideButtonTexts:r.hideButtonTexts;var d=null!=l.svgPath?l.svgPath:r.svgPath;if(i.hasSvg=d!==!1,i.svgPath=i.doc.querySelector(\"base\")?t.location.href.split(\"#\")[0]:\"\",0===a(\"#\"+s,i.doc).length&&d!==!1){if(null==d){for(var c=n.getElementsByTagName(\"script\"),u=0;u<c.length;u+=1){var g=c[u].src,f=g.match(\"trumbowyg(.min)?.js\");null!=f&&(d=g.substring(0,g.indexOf(f[0]))+\"ui/icons.svg\")}null==d&&console.warn(\"You must define svgPath: https://goo.gl/CfTY9U\")}var h=i.doc.createElement(\"div\");h.id=s,i.doc.body.insertBefore(h,i.doc.body.childNodes[0]),a.ajax({async:!0,type:\"GET\",contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",dataType:\"xml\",crossDomain:!0,url:d,data:null,beforeSend:null,complete:null,success:function(e){h.innerHTML=(new XMLSerializer).serializeToString(e.documentElement)}})}var p=i.lang.header,m=function(){return(t.chrome||t.Intl&&Intl.v8BreakIterator)&&\"CSS\"in t};i.btnsDef={viewHTML:{fn:\"toggle\",\"class\":\"trumbowyg-not-disable\"},undo:{isSupported:m,key:\"Z\"},redo:{isSupported:m,key:\"Y\"},p:{fn:\"formatBlock\"},blockquote:{fn:\"formatBlock\"},h1:{fn:\"formatBlock\",title:p+\" 1\"},h2:{fn:\"formatBlock\",title:p+\" 2\"},h3:{fn:\"formatBlock\",title:p+\" 3\"},h4:{fn:\"formatBlock\",title:p+\" 4\"},subscript:{tag:\"sub\"},superscript:{tag:\"sup\"},bold:{key:\"B\",tag:\"b\"},italic:{key:\"I\",tag:\"i\"},underline:{tag:\"u\"},strikethrough:{tag:\"strike\"},strong:{fn:\"bold\",key:\"B\"},em:{fn:\"italic\",key:\"I\"},del:{fn:\"strikethrough\"},createLink:{key:\"K\",tag:\"a\"},unlink:{},insertImage:{},justifyLeft:{tag:\"left\",forceCss:!0},justifyCenter:{tag:\"center\",forceCss:!0},justifyRight:{tag:\"right\",forceCss:!0},justifyFull:{tag:\"justify\",forceCss:!0},unorderedList:{fn:\"insertUnorderedList\",tag:\"ul\"},orderedList:{fn:\"insertOrderedList\",tag:\"ol\"},horizontalRule:{fn:\"insertHorizontalRule\"},removeformat:{},fullscreen:{\"class\":\"trumbowyg-not-disable\"},close:{fn:\"destroy\",\"class\":\"trumbowyg-not-disable\"},formatting:{dropdown:[\"p\",\"blockquote\",\"h1\",\"h2\",\"h3\",\"h4\"],ico:\"p\"},link:{dropdown:[\"createLink\",\"unlink\"]}},i.o=a.extend(!0,{},l.defaultOptions,r),i.o.hasOwnProperty(\"imgDblClickHandler\")||(i.o.imgDblClickHandler=i.getDefaultImgDblClickHandler()),i.urlPrefix=i.setupUrlPrefix(),i.disabled=i.o.disabled||\"TEXTAREA\"===o.nodeName&&o.disabled,r.btns?i.o.btns=r.btns:i.o.semantic||(i.o.btns[3]=[\"bold\",\"italic\",\"underline\",\"strikethrough\"]),a.each(i.o.btnsDef,function(e,t){i.addBtnDef(e,t)}),i.eventNamespace=\"trumbowyg-event\",i.keys=[],i.tagToButton={},i.tagHandlers=[],i.pasteHandlers=[].concat(i.o.pasteHandlers),i.isIE=e.userAgent.indexOf(\"MSIE\")!==-1||e.appVersion.indexOf(\"Trident/\")!==-1,i.init()};i.prototype={DEFAULT_SEMANTIC_MAP:{b:\"strong\",i:\"em\",s:\"del\",strike:\"del\",div:\"p\"},init:function(){var e=this;e.height=e.$ta.height(),e.initPlugins();try{e.doc.execCommand(\"enableObjectResizing\",!1,!1),e.doc.execCommand(\"defaultParagraphSeparator\",!1,\"p\")}catch(t){}e.buildEditor(),e.buildBtnPane(),e.fixedBtnPaneEvents(),e.buildOverlay(),setTimeout(function(){e.disabled&&e.setDisabled(!0),e.$c.trigger(\"tbwinit\")})},addBtnDef:function(e,t){this.btnsDef[e]=t},setupUrlPrefix:function(){var e=this.o.urlProtocol;if(e)return\"string\"!=typeof e?\"https://\":/:\\/\\/$/.test(e)?e:e+\"://\"},buildEditor:function(){var e=this,n=e.o.prefix,o=\"\";e.$box=a(\"<div/>\",{\"class\":n+\"box \"+n+\"editor-visible \"+n+e.o.lang+\" trumbowyg\"}),e.isTextarea=e.$ta.is(\"textarea\"),e.isTextarea?(o=e.$ta.val(),e.$ed=a(\"<div/>\"),e.$box.insertAfter(e.$ta).append(e.$ed,e.$ta)):(e.$ed=e.$ta,o=e.$ed.html(),e.$ta=a(\"<textarea/>\",{name:e.$ta.attr(\"id\"),height:e.height}).val(o),e.$box.insertAfter(e.$ed).append(e.$ta,e.$ed),e.syncCode()),e.$ta.addClass(n+\"textarea\").attr(\"tabindex\",-1),e.$ed.addClass(n+\"editor\").attr({contenteditable:!0,dir:e.lang._dir||\"ltr\"}).html(o),e.o.tabindex&&e.$ed.attr(\"tabindex\",e.o.tabindex),e.$c.is(\"[placeholder]\")&&e.$ed.attr(\"placeholder\",e.$c.attr(\"placeholder\")),e.$c.is(\"[spellcheck]\")&&e.$ed.attr(\"spellcheck\",e.$c.attr(\"spellcheck\")),e.o.resetCss&&e.$ed.addClass(n+\"reset-css\"),e.o.autogrow||e.$ta.add(e.$ed).css({height:e.height}),e.semanticCode(),e.o.autogrowOnEnter&&e.$ed.addClass(n+\"autogrow-on-enter\");var r,i=!1,s=!1,l=\"keyup\";e.$ed.on(\"dblclick\",\"img\",e.o.imgDblClickHandler).on(\"keydown\",function(t){if((t.ctrlKey||t.metaKey)&&!t.altKey){i=!0;var n=e.keys[String.fromCharCode(t.which).toUpperCase()];try{return e.execCmd(n.fn,n.param),!1}catch(a){}}}).on(\"compositionstart compositionupdate\",function(){s=!0}).on(l+\" compositionend\",function(t){if(\"compositionend\"===t.type)s=!1;else if(s)return;var n=t.which;if(!(n>=37&&n<=40)){if(!t.ctrlKey&&!t.metaKey||89!==n&&90!==n)if(i||17===n)\"undefined\"==typeof t.which&&e.semanticCode(!1,!1,!0);else{var a=!e.isIE||\"compositionend\"===t.type;e.semanticCode(!1,a&&13===n),e.$c.trigger(\"tbwchange\")}else e.$c.trigger(\"tbwchange\");setTimeout(function(){i=!1},50)}}).on(\"mouseup keydown keyup\",function(t){(!t.ctrlKey&&!t.metaKey||t.altKey)&&setTimeout(function(){i=!1},50),clearTimeout(r),r=setTimeout(function(){e.updateButtonPaneStatus()},50)}).on(\"focus blur\",function(t){if(e.$c.trigger(\"tbw\"+t.type),\"blur\"===t.type&&a(\".\"+n+\"active-button\",e.$btnPane).removeClass(n+\"active-button \"+n+\"active\"),e.o.autogrowOnEnter){if(e.autogrowOnEnterDontClose)return;\"focus\"===t.type?(e.autogrowOnEnterWasFocused=!0,e.autogrowEditorOnEnter()):e.o.autogrow||(e.$ed.css({height:e.$ed.css(\"min-height\")}),e.$c.trigger(\"tbwresize\"))}}).on(\"cut\",function(){setTimeout(function(){e.semanticCode(!1,!0),e.$c.trigger(\"tbwchange\")},0)}).on(\"paste\",function(n){if(e.o.removeformatPasted){n.preventDefault(),t.getSelection&&t.getSelection().deleteFromDocument&&t.getSelection().deleteFromDocument();try{var o=t.clipboardData.getData(\"Text\");try{e.doc.selection.createRange().pasteHTML(o)}catch(r){e.doc.getSelection().getRangeAt(0).insertNode(e.doc.createTextNode(o))}e.$c.trigger(\"tbwchange\",n)}catch(i){e.execCmd(\"insertText\",(n.originalEvent||n).clipboardData.getData(\"text/plain\"))}}a.each(e.pasteHandlers,function(e,t){t(n)}),setTimeout(function(){e.semanticCode(!1,!0),e.$c.trigger(\"tbwpaste\",n)},0)}),e.$ta.on(\"keyup\",function(){e.$c.trigger(\"tbwchange\")}).on(\"paste\",function(){setTimeout(function(){e.$c.trigger(\"tbwchange\")},0)}),e.$box.on(\"keydown\",function(t){if(27===t.which&&1===a(\".\"+n+\"modal-box\",e.$box).length)return e.closeModal(),!1})},autogrowEditorOnEnter:function(){var e=this;e.$ed.removeClass(\"autogrow-on-enter\");var t=e.$ed[0].clientHeight;e.$ed.height(\"auto\");var n=e.$ed[0].scrollHeight;e.$ed.addClass(\"autogrow-on-enter\"),t!==n&&(e.$ed.height(t),setTimeout(function(){e.$ed.css({height:n}),e.$c.trigger(\"tbwresize\")},0))},buildBtnPane:function(){var e=this,t=e.o.prefix,n=e.$btnPane=a(\"<div/>\",{\"class\":t+\"button-pane\"});a.each(e.o.btns,function(o,r){a.isArray(r)||(r=[r]);var i=a(\"<div/>\",{\"class\":t+\"button-group \"+(r.indexOf(\"fullscreen\")>=0?t+\"right\":\"\")});a.each(r,function(t,n){try{e.isSupportedBtn(n)&&i.append(e.buildBtn(n))}catch(a){}}),i.html().trim().length>0&&n.append(i)}),e.$box.prepend(n)},buildBtn:function(e){var t=this,n=t.o.prefix,o=t.btnsDef[e],r=o.dropdown,i=null==o.hasIcon||o.hasIcon,s=t.lang[e]||e,l=a(\"<button/>\",{type:\"button\",\"class\":n+e+\"-button \"+(o[\"class\"]||\"\")+(i?\"\":\" \"+n+\"textual-button\"),html:t.hasSvg&&i?'<svg><use xlink:href=\"'+t.svgPath+\"#\"+n+(o.ico||e).replace(/([A-Z]+)/g,\"-$1\").toLowerCase()+'\"/></svg>':t.hideButtonTexts?\"\":o.text||o.title||t.lang[e]||e,title:(o.title||o.text||s)+(o.key?\" (Ctrl + \"+o.key+\")\":\"\"),tabindex:-1,mousedown:function(){return r&&!a(\".\"+e+\"-\"+n+\"dropdown\",t.$box).is(\":hidden\")||a(\"body\",t.doc).trigger(\"mousedown\"),!((t.$btnPane.hasClass(n+\"disable\")||t.$box.hasClass(n+\"disabled\"))&&!a(this).hasClass(n+\"active\")&&!a(this).hasClass(n+\"not-disable\"))&&(t.execCmd(!!r&&\"dropdown\"||o.fn||e,o.param||e,o.forceCss),!1)}});if(r){l.addClass(n+\"open-dropdown\");var d=n+\"dropdown\",c={\"class\":d+\"-\"+e+\" \"+d+\" \"+n+\"fixed-top\"};c[\"data-\"+d]=e;var u=a(\"<div/>\",c);a.each(r,function(e,n){t.btnsDef[n]&&t.isSupportedBtn(n)&&u.append(t.buildSubBtn(n))}),t.$box.append(u.hide())}else o.key&&(t.keys[o.key]={fn:o.fn||e,param:o.param||e});return r||(t.tagToButton[(o.tag||e).toLowerCase()]=e),l},buildSubBtn:function(e){var t=this,n=t.o.prefix,o=t.btnsDef[e],r=null==o.hasIcon||o.hasIcon;return o.key&&(t.keys[o.key]={fn:o.fn||e,param:o.param||e}),t.tagToButton[(o.tag||e).toLowerCase()]=e,a(\"<button/>\",{type:\"button\",\"class\":n+e+\"-dropdown-button\"+(o.ico?\" \"+n+o.ico+\"-button\":\"\"),html:t.hasSvg&&r?'<svg><use xlink:href=\"'+t.svgPath+\"#\"+n+(o.ico||e).replace(/([A-Z]+)/g,\"-$1\").toLowerCase()+'\"/></svg>'+(o.text||o.title||t.lang[e]||e):o.text||o.title||t.lang[e]||e,title:o.key?\" (Ctrl + \"+o.key+\")\":null,style:o.style||null,mousedown:function(){return a(\"body\",t.doc).trigger(\"mousedown\"),t.execCmd(o.fn||e,o.param||e,o.forceCss),!1}})},isSupportedBtn:function(e){try{return this.btnsDef[e].isSupported()}catch(t){}return!0},buildOverlay:function(){var e=this;return e.$overlay=a(\"<div/>\",{\"class\":e.o.prefix+\"overlay\"}).appendTo(e.$box),e.$overlay},showOverlay:function(){var e=this;a(t).trigger(\"scroll\"),e.$overlay.fadeIn(200),e.$box.addClass(e.o.prefix+\"box-blur\")},hideOverlay:function(){var e=this;e.$overlay.fadeOut(50),e.$box.removeClass(e.o.prefix+\"box-blur\")},fixedBtnPaneEvents:function(){var e=this,n=e.o.fixedFullWidth,o=e.$box;e.o.fixedBtnPane&&(e.isFixed=!1,a(t).on(\"scroll.\"+e.eventNamespace+\" resize.\"+e.eventNamespace,function(){if(o){e.syncCode();var r=a(t).scrollTop(),i=o.offset().top+1,s=e.$btnPane,l=s.outerHeight()-2;r-i>0&&r-i-e.height<0?(e.isFixed||(e.isFixed=!0,s.css({position:\"fixed\",top:0,left:n?\"0\":\"auto\",zIndex:7}),a([e.$ta,e.$ed]).css({marginTop:s.height()})),s.css({width:n?\"100%\":o.width()-1+\"px\"}),a(\".\"+e.o.prefix+\"fixed-top\",o).css({position:n?\"fixed\":\"absolute\",top:n?l:l+(r-i)+\"px\",zIndex:15})):e.isFixed&&(e.isFixed=!1,s.removeAttr(\"style\"),a([e.$ta,e.$ed]).css({marginTop:0}),a(\".\"+e.o.prefix+\"fixed-top\",o).css({position:\"absolute\",top:l}))}}))},setDisabled:function(e){var t=this,n=t.o.prefix;t.disabled=e,e?t.$ta.attr(\"disabled\",!0):t.$ta.removeAttr(\"disabled\"),t.$box.toggleClass(n+\"disabled\",e),t.$ed.attr(\"contenteditable\",!e)},destroy:function(){var e=this,n=e.o.prefix;e.isTextarea?e.$box.after(e.$ta.css({height:\"\"}).val(e.html()).removeClass(n+\"textarea\").show()):e.$box.after(e.$ed.css({height:\"\"}).removeClass(n+\"editor\").removeAttr(\"contenteditable\").removeAttr(\"dir\").html(e.html()).show()),e.$ed.off(\"dblclick\",\"img\"),e.destroyPlugins(),e.$box.remove(),e.$c.removeData(\"trumbowyg\"),a(\"body\").removeClass(n+\"body-fullscreen\"),e.$c.trigger(\"tbwclose\"),a(t).off(\"scroll.\"+e.eventNamespace+\" resize.\"+e.eventNamespace)},empty:function(){this.$ta.val(\"\"),this.syncCode(!0)},toggle:function(){var e=this,t=e.o.prefix;e.o.autogrowOnEnter&&(e.autogrowOnEnterDontClose=!e.$box.hasClass(t+\"editor-hidden\")),e.semanticCode(!1,!0),setTimeout(function(){e.doc.activeElement.blur(),e.$box.toggleClass(t+\"editor-hidden \"+t+\"editor-visible\"),e.$btnPane.toggleClass(t+\"disable\"),a(\".\"+t+\"viewHTML-button\",e.$btnPane).toggleClass(t+\"active\"),e.$box.hasClass(t+\"editor-visible\")?e.$ta.attr(\"tabindex\",-1):e.$ta.removeAttr(\"tabindex\"),e.o.autogrowOnEnter&&!e.autogrowOnEnterDontClose&&e.autogrowEditorOnEnter()},0)},dropdown:function(e){var n=this,o=n.doc,r=n.o.prefix,i=a(\"[data-\"+r+\"dropdown=\"+e+\"]\",n.$box),s=a(\".\"+r+e+\"-button\",n.$btnPane),l=i.is(\":hidden\");if(a(\"body\",o).trigger(\"mousedown\"),l){var d=s.offset().left;s.addClass(r+\"active\"),i.css({position:\"absolute\",top:s.offset().top-n.$btnPane.offset().top+s.outerHeight(),left:n.o.fixedFullWidth&&n.isFixed?d+\"px\":d-n.$btnPane.offset().left+\"px\"}).show(),a(t).trigger(\"scroll\"),a(\"body\",o).on(\"mousedown.\"+n.eventNamespace,function(e){i.is(e.target)||(a(\".\"+r+\"dropdown\",n.$box).hide(),a(\".\"+r+\"active\",n.$btnPane).removeClass(r+\"active\"),a(\"body\",o).off(\"mousedown.\"+n.eventNamespace))})}},html:function(e){var t=this;return null!=e?(t.$ta.val(e),t.syncCode(!0),t.$c.trigger(\"tbwchange\"),t):t.$ta.val()},syncTextarea:function(){var e=this;e.$ta.val(e.$ed.text().trim().length>0||e.$ed.find(\"hr,img,embed,iframe,input\").length>0?e.$ed.html():\"\")},syncCode:function(e){var t=this;if(!e&&t.$ed.is(\":visible\"))t.syncTextarea();else{var n=a(\"<div>\").html(t.$ta.val()),o=a(\"<div>\").append(n);a(t.o.tagsToRemove.join(\",\"),o).remove(),t.$ed.html(o.contents().html())}if(t.o.autogrow&&(t.height=t.$ed.height(),t.height!==t.$ta.css(\"height\")&&(t.$ta.css({height:t.height}),t.$c.trigger(\"tbwresize\"))),t.o.autogrowOnEnter){t.$ed.height(\"auto\");var r=t.autogrowOnEnterWasFocused?t.$ed[0].scrollHeight:t.$ed.css(\"min-height\");r!==t.$ta.css(\"height\")&&(t.$ed.css({height:r}),t.$c.trigger(\"tbwresize\"))}},semanticCode:function(e,t,n){var o=this;if(o.saveRange(),o.syncCode(e),o.o.semantic){if(o.semanticTag(\"b\"),o.semanticTag(\"i\"),o.semanticTag(\"s\"),o.semanticTag(\"strike\"),t){var r=o.o.inlineElementsSelector,i=\":not(\"+r+\")\";o.$ed.contents().filter(function(){return 3===this.nodeType&&this.nodeValue.trim().length>0}).wrap(\"<span data-tbw/>\");var s=function(e){if(0!==e.length){var t=e.nextUntil(i).addBack().wrapAll(\"<p/>\").parent(),n=t.nextAll(r).first();t.next(\"br\").remove(),s(n)}};s(o.$ed.children(r).first()),o.semanticTag(\"div\",!0),o.$ed.find(\"p\").filter(function(){return(!o.range||this!==o.range.startContainer)&&(0===a(this).text().trim().length&&0===a(this).children().not(\"br,span\").length)}).contents().unwrap(),a(\"[data-tbw]\",o.$ed).contents().unwrap(),o.$ed.find(\"p:empty\").remove()}n||o.restoreRange(),o.syncTextarea()}},semanticTag:function(e,t){var n;if(null!=this.o.semantic&&\"object\"==typeof this.o.semantic&&this.o.semantic.hasOwnProperty(e))n=this.o.semantic[e];else{if(this.o.semantic!==!0||!this.DEFAULT_SEMANTIC_MAP.hasOwnProperty(e))return;n=this.DEFAULT_SEMANTIC_MAP[e]}a(e,this.$ed).each(function(){var e=a(this);e.wrap(\"<\"+n+\"/>\"),t&&a.each(e.prop(\"attributes\"),function(){e.parent().attr(this.name,this.value)}),e.contents().unwrap()})},createLink:function(){for(var e,t,n,o=this,r=o.doc.getSelection(),i=r.focusNode,s=(new XMLSerializer).serializeToString(r.getRangeAt(0).cloneContents());[\"A\",\"DIV\"].indexOf(i.nodeName)<0;)i=i.parentNode;if(i&&\"A\"===i.nodeName){var l=a(i);s=l.text(),e=l.attr(\"href\"),o.o.minimalLinks||(t=l.attr(\"title\"),n=l.attr(\"target\"));var d=o.doc.createRange();d.selectNode(i),r.removeAllRanges(),r.addRange(d)}o.saveRange();var c={url:{label:\"URL\",required:!0,value:e},text:{label:o.lang.text,value:s}};o.o.minimalLinks||Object.assign(c,{title:{label:o.lang.title,value:t},target:{label:o.lang.target,value:n}}),o.openModalInsert(o.lang.createLink,c,function(e){var t=o.prependUrlPrefix(e.url);if(!t.length)return!1;var n=a(['<a href=\"',t,'\">',e.text||e.url,\"</a>\"].join(\"\"));return o.o.minimalLinks||(e.title.length>0&&n.attr(\"title\",e.title),e.target.length>0&&n.attr(\"target\",e.target)),o.range.deleteContents(),o.range.insertNode(n[0]),o.syncCode(),o.$c.trigger(\"tbwchange\"),!0})},prependUrlPrefix:function(e){var t=this;if(!t.urlPrefix)return e;var n=/^([a-z][-+.a-z0-9]*:|\\/|#)/i;if(n.test(e))return e;var a=/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;return a.test(e)?\"mailto:\"+e:t.urlPrefix+e},unlink:function(){var e=this,t=e.doc.getSelection(),n=t.focusNode;if(t.isCollapsed){for(;[\"A\",\"DIV\"].indexOf(n.nodeName)<0;)n=n.parentNode;if(n&&\"A\"===n.nodeName){var a=e.doc.createRange();a.selectNode(n),t.removeAllRanges(),t.addRange(a)}}e.execCmd(\"unlink\",void 0,void 0,!0)},insertImage:function(){var e=this;e.saveRange();var t={url:{label:\"URL\",required:!0},alt:{label:e.lang.description,value:e.getRangeText()}};e.o.imageWidthModalEdit&&(t.width={}),e.openModalInsert(e.lang.insertImage,t,function(t){e.execCmd(\"insertImage\",t.url);var n=a('img[src=\"'+t.url+'\"]:not([alt])',e.$box);return n.attr(\"alt\",t.alt),e.o.imageWidthModalEdit&&n.attr({width:t.width}),e.syncCode(),e.$c.trigger(\"tbwchange\"),!0})},fullscreen:function(){var e,n=this,o=n.o.prefix,r=o+\"fullscreen\";n.$box.toggleClass(r),e=n.$box.hasClass(r),a(\"body\").toggleClass(o+\"body-fullscreen\",e),a(t).trigger(\"scroll\"),n.$c.trigger(\"tbw\"+(e?\"open\":\"close\")+\"fullscreen\")},execCmd:function(e,t,n,a){var o=this;a=!!a||\"\",\"dropdown\"!==e&&o.$ed.focus();try{o.doc.execCommand(\"styleWithCSS\",!1,n||!1)}catch(r){}try{o[e+a](t)}catch(r){try{e(t)}catch(i){\"insertHorizontalRule\"===e?t=void 0:\"formatBlock\"===e&&o.isIE&&(t=\"<\"+t+\">\"),o.doc.execCommand(e,!1,t),o.syncCode(),o.semanticCode(!1,!0)}\"dropdown\"!==e&&(o.updateButtonPaneStatus(),o.$c.trigger(\"tbwchange\"))}},openModal:function(e,n){var i=this,s=i.o.prefix;if(a(\".\"+s+\"modal-box\",i.$box).length>0)return!1;i.o.autogrowOnEnter&&(i.autogrowOnEnterDontClose=!0),i.saveRange(),i.showOverlay(),i.$btnPane.addClass(s+\"disable\");var l=a(\"<div/>\",{\"class\":s+\"modal \"+s+\"fixed-top\"}).css({top:i.$btnPane.height()}).appendTo(i.$box);i.$overlay.one(\"click\",function(){return l.trigger(r),!1});var d=a(\"<form/>\",{action:\"\",html:n}).on(\"submit\",function(){return l.trigger(o),!1}).on(\"reset\",function(){return l.trigger(r),!1}).on(\"submit reset\",function(){i.o.autogrowOnEnter&&(i.autogrowOnEnterDontClose=!1)}),c=a(\"<div/>\",{\"class\":s+\"modal-box\",html:d}).css({top:\"-\"+i.$btnPane.outerHeight()+\"px\",opacity:0}).appendTo(l).animate({top:0,opacity:1},100);return a(\"<span/>\",{text:e,\"class\":s+\"modal-title\"}).prependTo(c),l.height(c.outerHeight()+10),a(\"input:first\",c).focus(),i.buildModalBtn(\"submit\",c),i.buildModalBtn(\"reset\",c),a(t).trigger(\"scroll\"),l},buildModalBtn:function(e,t){var n=this,o=n.o.prefix;return a(\"<button/>\",{\"class\":o+\"modal-button \"+o+\"modal-\"+e,type:e,text:n.lang[e]||e}).appendTo(a(\"form\",t))},closeModal:function(){var e=this,t=e.o.prefix;e.$btnPane.removeClass(t+\"disable\"),e.$overlay.off();var n=a(\".\"+t+\"modal-box\",e.$box);n.animate({top:\"-\"+n.height()},100,function(){n.parent().remove(),e.hideOverlay()}),e.restoreRange()},openModalInsert:function(e,t,n){var i=this,s=i.o.prefix,l=i.lang,d=\"\";return a.each(t,function(e,t){var n=t.label||e,a=t.name||e,o=t.attributes||{},r=Object.keys(o).map(function(e){return e+'=\"'+o[e]+'\"'}).join(\" \");d+='<label><input type=\"'+(t.type||\"text\")+'\" name=\"'+a+'\"'+(\"checkbox\"===t.type&&t.value?' checked=\"checked\"':' value=\"'+(t.value||\"\").replace(/\"/g,\"&quot;\"))+'\"'+r+'><span class=\"'+s+'input-infos\"><span>'+(l[n]?l[n]:n)+\"</span></span></label>\"}),i.openModal(e,d).on(o,function(){var e=a(\"form\",a(this)),r=!0,s={};a.each(t,function(t,n){var o=n.name||t,l=a('input[name=\"'+o+'\"]',e),d=l.attr(\"type\");switch(d.toLowerCase()){case\"checkbox\":s[o]=l.is(\":checked\");break;case\"radio\":s[o]=l.filter(\":checked\").val();break;default:s[o]=a.trim(l.val())}n.required&&\"\"===s[o]?(r=!1,i.addErrorOnModalField(l,i.lang.required)):n.pattern&&!n.pattern.test(s[o])&&(r=!1,i.addErrorOnModalField(l,n.patternError))}),r&&(i.restoreRange(),n(s,t)&&(i.syncCode(),i.$c.trigger(\"tbwchange\"),i.closeModal(),a(this).off(o)))}).one(r,function(){a(this).off(o),i.closeModal()})},addErrorOnModalField:function(e,t){var n=this.o.prefix,o=e.parent();e.on(\"change keyup\",function(){o.removeClass(n+\"input-error\")}),o.addClass(n+\"input-error\").find(\"input+span\").append(a(\"<span/>\",{\"class\":n+\"msg-error\",text:t}))},getDefaultImgDblClickHandler:function(){var e=this;return function(){var t=a(this),n=t.attr(\"src\"),o=\"(Base64)\";0===n.indexOf(\"data:image\")&&(n=o);var r={url:{label:\"URL\",value:n,required:!0},alt:{label:e.lang.description,value:t.attr(\"alt\")}};return e.o.imageWidthModalEdit&&(r.width={value:t.attr(\"width\")?t.attr(\"width\"):\"\"}),e.openModalInsert(e.lang.insertImage,r,function(n){return n.url!==o&&t.attr({src:n.url}),t.attr({alt:n.alt}),e.o.imageWidthModalEdit&&(parseInt(n.width)>0?t.attr({width:n.width}):t.removeAttr(\"width\")),!0}),!1}},saveRange:function(){var e=this,t=e.doc.getSelection();if(e.range=null,t.rangeCount){var n,a=e.range=t.getRangeAt(0),o=e.doc.createRange();o.selectNodeContents(e.$ed[0]),o.setEnd(a.startContainer,a.startOffset),n=(o+\"\").length,e.metaRange={start:n,end:n+(a+\"\").length}}},restoreRange:function(){var e,t=this,n=t.metaRange,a=t.range,o=t.doc.getSelection();if(a){if(n&&n.start!==n.end){var r,i=0,s=[t.$ed[0]],l=!1,d=!1;for(e=t.doc.createRange();!d&&(r=s.pop());)if(3===r.nodeType){var c=i+r.length;!l&&n.start>=i&&n.start<=c&&(e.setStart(r,n.start-i),l=!0),l&&n.end>=i&&n.end<=c&&(e.setEnd(r,n.end-i),d=!0),i=c}else for(var u=r.childNodes,g=u.length;g>0;)g-=1,s.push(u[g])}o.removeAllRanges(),o.addRange(e||a)}},getRangeText:function(){return this.range+\"\"},updateButtonPaneStatus:function(){var e=this,t=e.o.prefix,n=e.getTagsRecursive(e.doc.getSelection().focusNode),o=t+\"active-button \"+t+\"active\";a(\".\"+t+\"active-button\",e.$btnPane).removeClass(o),a.each(n,function(n,r){var i=e.tagToButton[r.toLowerCase()],s=a(\".\"+t+i+\"-button\",e.$btnPane);if(s.length>0)s.addClass(o);else try{s=a(\".\"+t+\"dropdown .\"+t+i+\"-dropdown-button\",e.$box);var l=s.parent().data(\"dropdown\");a(\".\"+t+l+\"-button\",e.$box).addClass(o)}catch(d){}})},getTagsRecursive:function(e,t){var n=this;if(t=t||(e&&e.tagName?[e.tagName]:[]),!e||!e.parentNode)return t;e=e.parentNode;var o=e.tagName;return\"DIV\"===o?t:(\"P\"===o&&\"\"!==e.style.textAlign&&t.push(e.style.textAlign),a.each(n.tagHandlers,function(a,o){t=t.concat(o(e,n))}),t.push(o),n.getTagsRecursive(e,t).filter(function(e){return null!=e}))},initPlugins:function(){var e=this;e.loadedPlugins=[],a.each(a.trumbowyg.plugins,function(t,n){n.shouldInit&&!n.shouldInit(e)||(n.init(e),n.tagHandler&&e.tagHandlers.push(n.tagHandler),e.loadedPlugins.push(n))})},destroyPlugins:function(){a.each(this.loadedPlugins,function(e,t){t.destroy&&t.destroy()})}}}(navigator,window,document,jQuery);");
            System.out.println("write to file success : " + file.getPath());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeJsPlusJjlcJs(String htmlPath, String serverUrl) {
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/content/page-common/js");
            folder.mkdirs();
            file = new File(htmlPath + "/content/page-common/js/jcompress.js");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            bufferedWriter.write("!function(e){\"use strict\";function t(e){var t,n=[],r={};for(t in e)n.push([t,e[t]]);n.sort(function(e,t){return t[1]-e[1]});for(t in n)r[n[t][0]]=n[t][1];return r}function n(e){var t,r=e[e" +
                    ".length-1],o=e.substring(0,e.length-1);return\"undefined\"==typeof r?t=\"a\":\"z\"===r?t=\"A\":\"Z\"===r?(t=\"a\",o=\"\"!==o?n(o):\"a\"):t=String.fromCharCode(r.charCodeAt(0)+1),r=t,o+r}function r(e){var r,o," +
                    "i={}," +
                    "f=\"\",d=e.match(u);for(r in d)d[r].length>f.length+2&&(\"undefined\"!=typeof i[d[r]]?i[d[r]]+=1:i[d[r]]=0);o=t(i);for(r in o)f=n(f),o[r]=a+f+a;return o}function o(e,t){var n,r;for(n in t)r=new RegExp(n,\"g\")," +
                    "e=e" +
                    ".replace(r,t[n]);return e}function i(e,t){var n,r;for(n in t)r=new RegExp(t[n],\"g\"),e=e.replace(r,n);return e}function f(){this.setItem=function(e,t,n){var i,f,u;return(\"undefined\"==typeof " +
                    "n||\"no-beautify\"!==n)" +
                    "&&(f=JSON.parse(t),t=JSON.stringify(f)),u=r(t),i=o(t,u),\"undefined\"!=typeof n&&\"local-dict\"===n?d[e]=u:localStorage.setItem(e,i),\"undefined\"==typeof d[e]&&localStorage.setItem(\"d_\"+e,JSON.stringify(u))," +
                    "i}," +
                    "this.getItem=function(e){var t,n;return t=localStorage.getItem(e),n=\"undefined\"==typeof d[e]?JSON.parse(localStorage.getItem(\"d_\"+e)):d[e],i(t,n)},this.getDict=function(e){var t;return t=\"undefined\"==typeof" +
                    " " +
                    "d[e]?JSON.parse(localStorage.getItem(\"d_\"+e)):d[e]},this.setDict=function(e,t,n){\"undefined\"==typeof n?localStorage.setItem(\"d_\"+e,t):d[e]=t}}var u=/\\\"[a-zA-Z0-9]*\\\":/g,a=\"£\",d={};" +
                    "\"undefined\"!=typeof " +
                    "define&&define.amd?define([],function(){return new f}):\"undefined\"!=typeof module&&module.exports?module.exports=new f:e.JCOMPRESS=new f}(this);");
            System.out.println("write to file success : " + file.getPath());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeJsCommonServerJs(String htmlPath, String serverUrl, String tokenErrorStatus, String fileServer) {
        if (serverUrl == null) {
            serverUrl = "http://localhost:8080/";
        }
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/content/page-common/js");
            folder.mkdirs();
            file = new File(htmlPath + "/content/page-common/js/server.js");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            bufferedWriter.write("var validResForIndex = function(res){\nif(res.status==" + tokenErrorStatus + "){\nalert(res.message);\ngotoLoginForIndex();\n}else{\nalert(res.message);\n}\n}\n" +
                    "var validResForContent = function(res){\nif(res.status==" + tokenErrorStatus + "){\nalert(res.message);\ngotoLoginForContent();\n}else{\nalert(res.message);\n}\n}\n" +
                    "var timestampToTime = function (timestamp) {\n" +
                    "    var date = new Date(timestamp);\n" +
                    "    Y = date.getFullYear() + '-';\n" +
                    "    M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';\n" +
                    "    D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + 'T';\n" +
                    "    h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':';\n" +
                    "    m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':';\n" +
                    "    s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds());\n" +
                    "    return Y + M + D + h + m + s;\n" +
                    "}\n\n" +
                    "var gotoLoginForIndex=function(){\ntop.location.href='page-login.html';\nlocation.href='page-login.html';\n}\n" +
                    "var gotoLoginForContent=function(){\ntop.location.href='page-login.html';\nlocation.href='page-login.html';\n}\n" +
                    "var gotoIndex=function(){\ntop.location.href='index.html';\nlocation.href='index.html';\n}\n" +
                    "var gotoUrl=function(url){\nlocation.href=url;\n}\n" +
                    "\n" +
                    "var getLocalStorageItem = function (key) {\n" +
                    "    var data = JCOMPRESS.getItem(sha256(key));\n" +
                    "    if(data==undefined){\n" +
                    "        return undefined;\n" +
                    "    }\n" +
                    "    var dataJson = JSON.parse(data);\n" +
                    "    return dataJson.value;\n" +
                    "}\n" +
                    "\n" +
                    "var setLocalStorageItem = function (key, value) {\n" +
                    "    if (value != null && value != undefined) {\n" +
                    "        var data = {};\n" +
                    "        data.value=value;\n" +
                    "        JCOMPRESS.setItem(sha256(key), JSON.stringify(data));\n" +
                    "    }\n" +
                    "}\n" +
                    "\n" +
                    "var setLocalStorageObject = function (key, value) {\n" +
                    "    if (value != null && value != undefined) {\n" +
                    "        var data = {};\n" +
                    "        data.value=value;\n" +
                    "        JCOMPRESS.setItem(sha256(key), JSON.stringify(data));\n" +
                    "    }\n" +
                    "}\n" +
                    "\n" +
                    "var getLocalStorageObject = function (key) {\n" +
                    "    var data = JCOMPRESS.getItem(sha256(key));\n" +
                    "    if(data==undefined){\n" +
                    "        return undefined;\n" +
                    "    }\n" +
                    "    var dataJson = JSON.parse(data);\n" +
                    "    return dataJson.value;\n" +
                    "}\n" +
                    "\n" +
                    "var removeLocalStorageItem = function (key) {\n" +
                    "    localStorage.removeItem(\"d_\"+sha256(key));\n" +
                    "    localStorage.removeItem(sha256(key));\n" +
                    "}\n" +
                    "\n" +
                    "var base64Encode = function (str) {\n" +
                    "    return btoa(encodeURIComponent(str));\n" +
                    "}\n" +
                    "\n" +
                    "var base64Decode = function (str) {\n" +
                    "    if (str == null || str == undefined) {\n" +
                    "        return undefined;\n" +
                    "    }\n" +
                    "    return decodeURIComponent(atob(str));\n" +
                    "}\n\n");
            System.out.println("write to file success : " + file.getPath());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeJsCommonMd5Js(String htmlPath, String serverUrl) {
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/content/page-common/js");
            folder.mkdirs();
            file = new File(htmlPath + "/content/page-common/js/md5.js");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            bufferedWriter.write("!function(a){\"use strict\";function b(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c}function c(a,b){return a<<b|a>>>32-b}function d(a,d,e,f,g,h){return b(c(b(b(d,a),b(f,h)),g),e)}function e(a,b,c,e,f,g,h){return d(b&c|~b&e,a,b,f,g,h)}function f(a,b,c,e,f,g,h){return d(b&e|c&~e,a,b,f,g,h)}function g(a,b,c,e,f,g,h){return d(b^c^e,a,b,f,g,h)}function h(a,b,c,e,f,g,h){return d(c^(b|~e),a,b,f,g,h)}function i(a,c){a[c>>5]|=128<<c%32,a[(c+64>>>9<<4)+14]=c;var d,i,j,k,l,m=1732584193,n=-271733879,o=-1732584194,p=271733878;for(d=0;d<a.length;d+=16)i=m,j=n,k=o,l=p,m=e(m,n,o,p,a[d],7,-680876936),p=e(p,m,n,o,a[d+1],12,-389564586),o=e(o,p,m,n,a[d+2],17,606105819),n=e(n,o,p,m,a[d+3],22,-1044525330),m=e(m,n,o,p,a[d+4],7,-176418897),p=e(p,m,n,o,a[d+5],12,1200080426),o=e(o,p,m,n,a[d+6],17,-1473231341),n=e(n,o,p,m,a[d+7],22,-45705983),m=e(m,n,o,p,a[d+8],7,1770035416),p=e(p,m,n,o,a[d+9],12,-1958414417),o=e(o,p,m,n,a[d+10],17,-42063),n=e(n,o,p,m,a[d+11],22,-1990404162),m=e(m,n,o,p,a[d+12],7,1804603682),p=e(p,m,n,o,a[d+13],12,-40341101),o=e(o,p,m,n,a[d+14],17,-1502002290),n=e(n,o,p,m,a[d+15],22,1236535329),m=f(m,n,o,p,a[d+1],5,-165796510),p=f(p,m,n,o,a[d+6],9,-1069501632),o=f(o,p,m,n,a[d+11],14,643717713),n=f(n,o,p,m,a[d],20,-373897302),m=f(m,n,o,p,a[d+5],5,-701558691),p=f(p,m,n,o,a[d+10],9,38016083),o=f(o,p,m,n,a[d+15],14,-660478335),n=f(n,o,p,m,a[d+4],20,-405537848),m=f(m,n,o,p,a[d+9],5,568446438),p=f(p,m,n,o,a[d+14],9,-1019803690),o=f(o,p,m,n,a[d+3],14,-187363961),n=f(n,o,p,m,a[d+8],20,1163531501),m=f(m,n,o,p,a[d+13],5,-1444681467),p=f(p,m,n,o,a[d+2],9,-51403784),o=f(o,p,m,n,a[d+7],14,1735328473),n=f(n,o,p,m,a[d+12],20,-1926607734),m=g(m,n,o,p,a[d+5],4,-378558),p=g(p,m,n,o,a[d+8],11,-2022574463),o=g(o,p,m,n,a[d+11],16,1839030562),n=g(n,o,p,m,a[d+14],23,-35309556),m=g(m,n,o,p,a[d+1],4,-1530992060),p=g(p,m,n,o,a[d+4],11,1272893353),o=g(o,p,m,n,a[d+7],16,-155497632),n=g(n,o,p,m,a[d+10],23,-1094730640),m=g(m,n,o,p,a[d+13],4,681279174),p=g(p,m,n,o,a[d],11,-358537222),o=g(o,p,m,n,a[d+3],16,-722521979),n=g(n,o,p,m,a[d+6],23,76029189),m=g(m,n,o,p,a[d+9],4,-640364487),p=g(p,m,n,o,a[d+12],11,-421815835),o=g(o,p,m,n,a[d+15],16,530742520),n=g(n,o,p,m,a[d+2],23,-995338651),m=h(m,n,o,p,a[d],6,-198630844),p=h(p,m,n,o,a[d+7],10,1126891415),o=h(o,p,m,n,a[d+14],15,-1416354905),n=h(n,o,p,m,a[d+5],21,-57434055),m=h(m,n,o,p,a[d+12],6,1700485571),p=h(p,m,n,o,a[d+3],10,-1894986606),o=h(o,p,m,n,a[d+10],15,-1051523),n=h(n,o,p,m,a[d+1],21,-2054922799),m=h(m,n,o,p,a[d+8],6,1873313359),p=h(p,m,n,o,a[d+15],10,-30611744),o=h(o,p,m,n,a[d+6],15,-1560198380),n=h(n,o,p,m,a[d+13],21,1309151649),m=h(m,n,o,p,a[d+4],6,-145523070),p=h(p,m,n,o,a[d+11],10,-1120210379),o=h(o,p,m,n,a[d+2],15,718787259),n=h(n,o,p,m,a[d+9],21,-343485551),m=b(m,i),n=b(n,j),o=b(o,k),p=b(p,l);return[m,n,o,p]}function j(a){var b,c=\"\";for(b=0;b<32*a.length;b+=8)c+=String.fromCharCode(a[b>>5]>>>b%32&255);return c}function k(a){var b,c=[];for(c[(a.length>>2)-1]=void 0,b=0;b<c.length;b+=1)c[b]=0;for(b=0;b<8*a.length;b+=8)c[b>>5]|=(255&a.charCodeAt(b/8))<<b%32;return c}function l(a){return j(i(k(a),8*a.length))}function m(a,b){var c,d,e=k(a),f=[],g=[];for(f[15]=g[15]=void 0,e.length>16&&(e=i(e,8*a.length)),c=0;16>c;c+=1)f[c]=909522486^e[c],g[c]=1549556828^e[c];return d=i(f.concat(k(b)),512+8*b.length),j(i(g.concat(d),640))}function n(a){var b,c,d=\"0123456789abcdef\",e=\"\";for(c=0;c<a.length;c+=1)b=a.charCodeAt(c),e+=d.charAt(b>>>4&15)+d.charAt(15&b);return e}function o(a){return unescape(encodeURIComponent(a))}function p(a){return l(o(a))}function q(a){return n(p(a))}function r(a,b){return m(o(a),o(b))}function s(a,b){return n(r(a,b))}function t(a,b,c){return b?c?r(b,a):s(b,a):c?p(a):q(a)}\"function\"==typeof define&&define.amd?define(function(){return t}):a.md5=t}(this);");
            System.out.println("write to file success : " + file.getPath());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeJsCommonSha256Js(String htmlPath, String serverUrl) {
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/content/page-common/js");
            folder.mkdirs();
            file = new File(htmlPath + "/content/page-common/js/sha256.js");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            bufferedWriter.write("function sha256(s){var chrsz=8;var hexcase=0;function safe_add(x,y){var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF)}function S(X,n){return(X>>>n)|(X<<(32-n))}function R(X,n){return(X>>>n)}function Ch(x,y,z){return((x&y)^((~x)&z))}function Maj(x,y,z){return((x&y)^(x&z)^(y&z))}function Sigma0256(x){return(S(x,2)^S(x,13)^S(x,22))}function Sigma1256(x){return(S(x,6)^S(x,11)^S(x,25))}function Gamma0256(x){return(S(x,7)^S(x,18)^R(x,3))}function Gamma1256(x){return(S(x,17)^S(x,19)^R(x,10))}function core_sha256(m,l){var K=new Array(0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2);var HASH=new Array(0x6A09E667,0xBB67AE85,0x3C6EF372,0xA54FF53A,0x510E527F,0x9B05688C,0x1F83D9AB,0x5BE0CD19);var W=new Array(64);var a,b,c,d,e,f,g,h,i,j;var T1,T2;m[l>>5]|=0x80<<(24-l%32);m[((l+64>>9)<<4)+15]=l;for(var i=0;i<m.length;i+=16){a=HASH[0];b=HASH[1];c=HASH[2];d=HASH[3];e=HASH[4];f=HASH[5];g=HASH[6];h=HASH[7];for(var j=0;j<64;j++){if(j<16)W[j]=m[j+i];else W[j]=safe_add(safe_add(safe_add(Gamma1256(W[j-2]),W[j-7]),Gamma0256(W[j-15])),W[j-16]);T1=safe_add(safe_add(safe_add(safe_add(h,Sigma1256(e)),Ch(e,f,g)),K[j]),W[j]);T2=safe_add(Sigma0256(a),Maj(a,b,c));h=g;g=f;f=e;e=safe_add(d,T1);d=c;c=b;b=a;a=safe_add(T1,T2)}HASH[0]=safe_add(a,HASH[0]);HASH[1]=safe_add(b,HASH[1]);HASH[2]=safe_add(c,HASH[2]);HASH[3]=safe_add(d,HASH[3]);HASH[4]=safe_add(e,HASH[4]);HASH[5]=safe_add(f,HASH[5]);HASH[6]=safe_add(g,HASH[6]);HASH[7]=safe_add(h,HASH[7])}return HASH}function str2binb(str){var bin=Array();var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz){bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(24-i%32)}return bin}function Utf8Encode(string){string=string.replace(/\\r\\n/g,\"\\n\");var utftext=\"\";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c)}else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128)}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128)}}return utftext}function binb2hex(binarray){var hex_tab=hexcase?\"0123456789ABCDEF\":\"0123456789abcdef\";var str=\"\";for(var i=0;i<binarray.length*4;i++){str+=hex_tab.charAt((binarray[i>>2]>>((3-i%4)*8+4))&0xF)+hex_tab.charAt((binarray[i>>2]>>((3-i%4)*8))&0xF)}return str}s=Utf8Encode(s);return binb2hex(core_sha256(str2binb(s),s.length*chrsz))}");
            System.out.println("write to file success : " + file.getPath());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeJsCommonJqueryJs(String htmlPath, String serverUrl) {
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/content/page-common/js");
            folder.mkdirs();
            file = new File(htmlPath + "/content/page-common/js/jquery.js");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            bufferedWriter.write("window.jQuery||function(e,t){function n(e){var t=he[e]={};return K.each(e.split(te),function(e,n){t[n]=!0}),t}function r(e,n,r){if(r===t&&1===e.nodeType){var i=\"data-\"+n.replace(me,\"-$1\").toLowerCase();if(r=e.getAttribute(i),\"string\"==typeof r){try{r=\"true\"===r?!0:\"false\"===r?!1:\"null\"===r?null:+r+\"\"===r?+r:ge.test(r)?K.parseJSON(r):r}catch(o){}K.data(e,n,r)}else r=t}return r}function i(e){var t;for(t in e)if((\"data\"!==t||!K.isEmptyObject(e[t]))&&\"toJSON\"!==t)return!1;return!0}function o(){return!1}function a(){return!0}function s(e){return!e||!e.parentNode||11===e.parentNode.nodeType}function l(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function u(e,t,n){if(t=t||0,K.isFunction(t))return K.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return K.grep(e,function(e,r){return e===t===n});if(\"string\"==typeof t){var r=K.grep(e,function(e){return 1===e.nodeType});if(qe.test(t))return K.filter(t,r,!n);t=K.filter(t,r)}return K.grep(e,function(e,r){return K.inArray(e,t)>=0===n})}function c(e){var t=We.split(\"|\"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function f(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function p(e,t){if(1===t.nodeType&&K.hasData(e)){var n,r,i,o=K._data(e),a=K._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)K.event.add(t,n,s[n][r])}a.data&&(a.data=K.extend({},a.data))}}function d(e,t){var n;1===t.nodeType&&(t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),\"object\"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),K.support.html5Clone&&e.innerHTML&&!K.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):\"input\"===n&&Ve.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):\"option\"===n?t.selected=e.defaultSelected:\"input\"===n||\"textarea\"===n?t.defaultValue=e.defaultValue:\"script\"===n&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(K.expando))}function h(e){return\"undefined\"!=typeof e.getElementsByTagName?e.getElementsByTagName(\"*\"):\"undefined\"!=typeof e.querySelectorAll?e.querySelectorAll(\"*\"):[]}function g(e){Ve.test(e.type)&&(e.defaultChecked=e.checked)}function m(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=yt.length;i--;)if(t=yt[i]+n,t in e)return t;return r}function y(e,t){return e=t||e,\"none\"===K.css(e,\"display\")||!K.contains(e.ownerDocument,e)}function v(e,t){for(var n,r,i=[],o=0,a=e.length;a>o;o++)n=e[o],n.style&&(i[o]=K._data(n,\"olddisplay\"),t?(!i[o]&&\"none\"===n.style.display&&(n.style.display=\"\"),\"\"===n.style.display&&y(n)&&(i[o]=K._data(n,\"olddisplay\",T(n.nodeName)))):(r=nt(n,\"display\"),!i[o]&&\"none\"!==r&&K._data(n,\"olddisplay\",r)));for(o=0;a>o;o++)n=e[o],n.style&&(t&&\"none\"!==n.style.display&&\"\"!==n.style.display||(n.style.display=t?i[o]||\"\":\"none\"));return e}function b(e,t,n){var r=ct.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||\"px\"):t}function x(e,t,n,r){for(var i=n===(r?\"border\":\"content\")?4:\"width\"===t?1:0,o=0;4>i;i+=2)\"margin\"===n&&(o+=K.css(e,n+mt[i],!0)),r?(\"content\"===n&&(o-=parseFloat(nt(e,\"padding\"+mt[i]))||0),\"margin\"!==n&&(o-=parseFloat(nt(e,\"border\"+mt[i]+\"Width\"))||0)):(o+=parseFloat(nt(e,\"padding\"+mt[i]))||0,\"padding\"!==n&&(o+=parseFloat(nt(e,\"border\"+mt[i]+\"Width\"))||0));return o}function w(e,t,n){var r=\"width\"===t?e.offsetWidth:e.offsetHeight,i=!0,o=K.support.boxSizing&&\"border-box\"===K.css(e,\"boxSizing\");if(0>=r||null==r){if(r=nt(e,t),(0>r||null==r)&&(r=e.style[t]),ft.test(r))return r;i=o&&(K.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+x(e,t,n||(o?\"border\":\"content\"),i)+\"px\"}function T(e){if(dt[e])return dt[e];var t=K(\"<\"+e+\">\").appendTo(R.body),n=t.css(\"display\");return t.remove(),(\"none\"===n||\"\"===n)&&(rt=R.body.appendChild(rt||K.extend(R.createElement(\"iframe\"),{frameBorder:0,width:0,height:0})),it&&rt.createElement||(it=(rt.contentWindow||rt.contentDocument).document,it.write(\"<!doctype html><html><body>\"),it.close()),t=it.body.appendChild(it.createElement(e)),n=nt(t,\"display\"),R.body.removeChild(rt)),dt[e]=n,n}function N(e,t,n,r){var i;if(K.isArray(t))K.each(t,function(t,i){n||xt.test(e)?r(e,i):N(e+\"[\"+(\"object\"==typeof i?t:\"\")+\"]\",i,n,r)});else if(n||\"object\"!==K.type(t))r(e,t);else for(i in t)N(e+\"[\"+i+\"]\",t[i],n,r)}function C(e){return function(t,n){\"string\"!=typeof t&&(n=t,t=\"*\");var r,i,o,a=t.toLowerCase().split(te),s=0,l=a.length;if(K.isFunction(n))for(;l>s;s++)r=a[s],o=/^\\+/.test(r),o&&(r=r.substr(1)||\"*\"),i=e[r]=e[r]||[],i[o?\"unshift\":\"push\"](n)}}function k(e,n,r,i,o,a){o=o||n.dataTypes[0],a=a||{},a[o]=!0;for(var s,l=e[o],u=0,c=l?l.length:0,f=e===qt;c>u&&(f||!s);u++)s=l[u](n,r,i),\"string\"==typeof s&&(!f||a[s]?s=t:(n.dataTypes.unshift(s),s=k(e,n,r,i,s,a)));return(f||!s)&&!a[\"*\"]&&(s=k(e,n,r,i,\"*\",a)),s}function E(e,n){var r,i,o=K.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((o[r]?e:i||(i={}))[r]=n[r]);i&&K.extend(!0,e,i)}function S(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes,c=e.responseFields;for(o in c)o in r&&(n[c[o]]=r[o]);for(;\"*\"===u[0];)u.shift(),i===t&&(i=e.mimeType||n.getResponseHeader(\"content-type\"));if(i)for(o in l)if(l[o]&&l[o].test(i)){u.unshift(o);break}if(u[0]in r)a=u[0];else{for(o in r){if(!u[0]||e.converters[o+\" \"+u[0]]){a=o;break}s||(s=o)}a=a||s}return a?(a!==u[0]&&u.unshift(a),r[a]):void 0}function j(e,t){var n,r,i,o,a=e.dataTypes.slice(),s=a[0],l={},u=0;if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a[1])for(n in e.converters)l[n.toLowerCase()]=e.converters[n];for(;i=a[++u];)if(\"*\"!==i){if(\"*\"!==s&&s!==i){if(n=l[s+\" \"+i]||l[\"* \"+i],!n)for(r in l)if(o=r.split(\" \"),o[1]===i&&(n=l[s+\" \"+o[0]]||l[\"* \"+o[0]])){n===!0?n=l[r]:l[r]!==!0&&(i=o[0],a.splice(u--,0,i));break}if(n!==!0)if(n&&e[\"throws\"])t=n(t);else try{t=n(t)}catch(c){return{state:\"parsererror\",error:n?c:\"No conversion from \"+s+\" to \"+i}}}s=i}return{state:\"success\",data:t}}function A(){try{return new e.XMLHttpRequest}catch(t){}}function L(){try{return new e.ActiveXObject(\"Microsoft.XMLHTTP\")}catch(t){}}function D(){return setTimeout(function(){Qt=t},0),Qt=K.now()}function H(e,t){K.each(t,function(t,n){for(var r=(Zt[t]||[]).concat(Zt[\"*\"]),i=0,o=r.length;o>i;i++)if(r[i].call(e,t,n))return})}function F(e,t,n){var r,i=0,o=Kt.length,a=K.Deferred().always(function(){delete s.elem}),s=function(){for(var t=Qt||D(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,i=1-r,o=0,s=l.tweens.length;s>o;o++)l.tweens[o].run(i);return a.notifyWith(e,[l,i,n]),1>i&&s?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:K.extend({},t),opts:K.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Qt||D(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=K.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(i),i},stop:function(t){for(var n=0,r=t?l.tweens.length:0;r>n;n++)l.tweens[n].run(1);return t?a.resolveWith(e,[l,t]):a.rejectWith(e,[l,t]),this}}),u=l.props;for(M(u,l.opts.specialEasing);o>i;i++)if(r=Kt[i].call(l,e,u,l.opts))return r;return H(l,u),K.isFunction(l.opts.start)&&l.opts.start.call(e,l),K.fx.timer(K.extend(s,{anim:l,queue:l.opts.queue,elem:e})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function M(e,t){var n,r,i,o,a;for(n in e)if(r=K.camelCase(n),i=t[r],o=e[n],K.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=K.cssHooks[r],a&&\"expand\"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function O(e,t,n){var r,i,o,a,s,l,u,c,f,p=this,d=e.style,h={},g=[],m=e.nodeType&&y(e);n.queue||(c=K._queueHooks(e,\"fx\"),null==c.unqueued&&(c.unqueued=0,f=c.empty.fire,c.empty.fire=function(){c.unqueued||f()}),c.unqueued++,p.always(function(){p.always(function(){c.unqueued--,K.queue(e,\"fx\").length||c.empty.fire()})})),1===e.nodeType&&(\"height\"in t||\"width\"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],\"inline\"===K.css(e,\"display\")&&\"none\"===K.css(e,\"float\")&&(K.support.inlineBlockNeedsLayout&&\"inline\"!==T(e.nodeName)?d.zoom=1:d.display=\"inline-block\")),n.overflow&&(d.overflow=\"hidden\",K.support.shrinkWrapBlocks||p.done(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(r in t)if(o=t[r],Vt.exec(o)){if(delete t[r],l=l||\"toggle\"===o,o===(m?\"hide\":\"show\"))continue;g.push(r)}if(a=g.length){s=K._data(e,\"fxshow\")||K._data(e,\"fxshow\",{}),\"hidden\"in s&&(m=s.hidden),l&&(s.hidden=!m),m?K(e).show():p.done(function(){K(e).hide()}),p.done(function(){var t;K.removeData(e,\"fxshow\",!0);for(t in h)K.style(e,t,h[t])});for(r=0;a>r;r++)i=g[r],u=p.createTween(i,m?s[i]:0),h[i]=s[i]||K.style(e,i),i in s||(s[i]=u.start,m&&(u.end=u.start,u.start=\"width\"===i||\"height\"===i?1:0))}}function q(e,t,n,r,i){return new q.prototype.init(e,t,n,r,i)}function _(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=mt[i],r[\"margin\"+n]=r[\"padding\"+n]=e;return t&&(r.opacity=r.width=e),r}function B(e){return K.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var W,P,R=e.document,$=e.location,I=e.navigator,z=e.jQuery,X=e.$,U=Array.prototype.push,Q=Array.prototype.slice,Y=Array.prototype.indexOf,V=Object.prototype.toString,J=Object.prototype.hasOwnProperty,G=String.prototype.trim,K=function(e,t){return new K.fn.init(e,t,W)},Z=/[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/.source,ee=/\\S/,te=/\\s+/,ne=/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,re=/^(?:[^#<]*(<[\\w\\W]+>)[^>]*$|#([\\w\\-]*)$)/,ie=/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,oe=/^[\\],:{}\\s]*$/,ae=/(?:^|:|,)(?:\\s*\\[)+/g,se=/\\\\(?:[\"\\\\\\/bfnrt]|u[\\da-fA-F]{4})/g,le=/\"[^\"\\\\\\r\\n]*\"|true|false|null|-?(?:\\d\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/g,ue=/^-ms-/,ce=/-([\\da-z])/gi,fe=function(e,t){return(t+\"\").toUpperCase()},pe=function(){R.addEventListener?(R.removeEventListener(\"DOMContentLoaded\",pe,!1),K.ready()):\"complete\"===R.readyState&&(R.detachEvent(\"onreadystatechange\",pe),K.ready())},de={};K.fn=K.prototype={constructor:K,init:function(e,n,r){var i,o,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(\"string\"==typeof e){if(i=\"<\"===e.charAt(0)&&\">\"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:re.exec(e),i&&(i[1]||!n)){if(i[1])return n=n instanceof K?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:R,e=K.parseHTML(i[1],a,!0),ie.test(i[1])&&K.isPlainObject(n)&&this.attr.call(e,n,!0),K.merge(this,e);if(o=R.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=R,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return K.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),K.makeArray(e,this))},selector:\"\",jquery:\"1.8.3\",length:0,size:function(){return this.length},toArray:function(){return Q.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=K.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,\"find\"===t?r.selector=this.selector+(this.selector?\" \":\"\")+n:t&&(r.selector=this.selector+\".\"+t+\"(\"+n+\")\"),r},each:function(e,t){return K.each(this,e,t)},ready:function(e){return K.ready.promise().done(e),this},eq:function(e){return e=+e,-1===e?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Q.apply(this,arguments),\"slice\",Q.call(arguments).join(\",\"))},map:function(e){return this.pushStack(K.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:U,sort:[].sort,splice:[].splice},K.fn.init.prototype=K.fn,K.extend=K.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for(\"boolean\"==typeof s&&(c=s,s=arguments[1]||{},l=2),\"object\"!=typeof s&&!K.isFunction(s)&&(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(e=arguments[l]))for(n in e)r=s[n],i=e[n],s!==i&&(c&&i&&(K.isPlainObject(i)||(o=K.isArray(i)))?(o?(o=!1,a=r&&K.isArray(r)?r:[]):a=r&&K.isPlainObject(r)?r:{},s[n]=K.extend(c,a,i)):i!==t&&(s[n]=i));return s},K.extend({noConflict:function(t){return e.$===K&&(e.$=X),t&&e.jQuery===K&&(e.jQuery=z),K},isReady:!1,readyWait:1,holdReady:function(e){e?K.readyWait++:K.ready(!0)},ready:function(e){if(e===!0?!--K.readyWait:!K.isReady){if(!R.body)return setTimeout(K.ready,1);K.isReady=!0,e!==!0&&--K.readyWait>0||(P.resolveWith(R,[K]),K.fn.trigger&&K(R).trigger(\"ready\").off(\"ready\"))}},isFunction:function(e){return\"function\"===K.type(e)},isArray:Array.isArray||function(e){return\"array\"===K.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):de[V.call(e)]||\"object\"},isPlainObject:function(e){if(!e||\"object\"!==K.type(e)||e.nodeType||K.isWindow(e))return!1;try{if(e.constructor&&!J.call(e,\"constructor\")&&!J.call(e.constructor.prototype,\"isPrototypeOf\"))return!1}catch(n){return!1}var r;for(r in e);return r===t||J.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return e&&\"string\"==typeof e?(\"boolean\"==typeof t&&(n=t,t=0),t=t||R,(r=ie.exec(e))?[t.createElement(r[1])]:(r=K.buildFragment([e],t,n?null:[]),K.merge([],(r.cacheable?K.clone(r.fragment):r.fragment).childNodes))):null},parseJSON:function(t){return t&&\"string\"==typeof t?(t=K.trim(t),e.JSON&&e.JSON.parse?e.JSON.parse(t):oe.test(t.replace(se,\"@\").replace(le,\"]\").replace(ae,\"\"))?new Function(\"return \"+t)():void K.error(\"Invalid JSON: \"+t)):null},parseXML:function(n){var r,i;if(!n||\"string\"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,\"text/xml\")):(r=new ActiveXObject(\"Microsoft.XMLDOM\"),r.async=\"false\",r.loadXML(n))}catch(o){r=t}return(!r||!r.documentElement||r.getElementsByTagName(\"parsererror\").length)&&K.error(\"Invalid XML: \"+n),r},noop:function(){},globalEval:function(t){t&&ee.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ue,\"ms-\").replace(ce,fe)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,o=0,a=e.length,s=a===t||K.isFunction(e);if(r)if(s){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;a>o&&n.apply(e[o++],r)!==!1;);else if(s){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;a>o&&n.call(e[o],o,e[o++])!==!1;);return e},trim:G&&!G.call(\"\\ufeff\\xa0\")?function(e){return null==e?\"\":G.call(e)}:function(e){return null==e?\"\":(e+\"\").replace(ne,\"\")},makeArray:function(e,t){var n,r=t||[];return null!=e&&(n=K.type(e),null==e.length||\"string\"===n||\"function\"===n||\"regexp\"===n||K.isWindow(e)?U.call(r,e):K.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(Y)return Y.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if(\"number\"==typeof r)for(;r>o;o++)e[i++]=n[o];else for(;n[o]!==t;)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,n,r){var i,o,a=[],s=0,l=e.length,u=e instanceof K||l!==t&&\"number\"==typeof l&&(l>0&&e[0]&&e[l-1]||0===l||K.isArray(e));if(u)for(;l>s;s++)i=n(e[s],s,r),null!=i&&(a[a.length]=i);else for(o in e)i=n(e[o],o,r),null!=i&&(a[a.length]=i);return a.concat.apply([],a)},guid:1,proxy:function(e,n){var r,i,o;return\"string\"==typeof n&&(r=e[n],n=e,e=r),K.isFunction(e)?(i=Q.call(arguments,2),o=function(){return e.apply(n,i.concat(Q.call(arguments)))},o.guid=e.guid=e.guid||K.guid++,o):t},access:function(e,n,r,i,o,a,s){var l,u=null==r,c=0,f=e.length;if(r&&\"object\"==typeof r){for(c in r)K.access(e,n,c,r[c],1,a,i);o=1}else if(i!==t){if(l=s===t&&K.isFunction(i),u&&(l?(l=n,n=function(e,t,n){return l.call(K(e),n)}):(n.call(e,i),n=null)),n)for(;f>c;c++)n(e[c],r,l?i.call(e[c],c,n(e[c],r)):i,s);o=1}return o?e:u?n.call(e):f?n(e[0],r):a},now:function(){return(new Date).getTime()}}),K.ready.promise=function(t){if(!P)if(P=K.Deferred(),\"complete\"===R.readyState)setTimeout(K.ready,1);else if(R.addEventListener)R.addEventListener(\"DOMContentLoaded\",pe,!1),e.addEventListener(\"load\",K.ready,!1);else{R.attachEvent(\"onreadystatechange\",pe),e.attachEvent(\"onload\",K.ready);var n=!1;try{n=null==e.frameElement&&R.documentElement}catch(r){}n&&n.doScroll&&function i(){if(!K.isReady){try{n.doScroll(\"left\")}catch(e){return setTimeout(i,50)}K.ready()}}()}return P.promise(t)},K.each(\"Boolean Number String Function Array Date RegExp Object\".split(\" \"),function(e,t){de[\"[object \"+t+\"]\"]=t.toLowerCase()}),W=K(R);var he={};K.Callbacks=function(e){e=\"string\"==typeof e?he[e]||n(e):K.extend({},e);var r,i,o,a,s,l,u=[],c=!e.once&&[],f=function(t){for(r=e.memory&&t,i=!0,l=a||0,a=0,s=u.length,o=!0;u&&s>l;l++)if(u[l].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}o=!1,u&&(c?c.length&&f(c.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;!function n(t){K.each(t,function(t,r){var i=K.type(r);\"function\"===i?(!e.unique||!p.has(r))&&u.push(r):r&&r.length&&\"string\"!==i&&n(r)})}(arguments),o?s=u.length:r&&(a=t,f(r))}return this},remove:function(){return u&&K.each(arguments,function(e,t){for(var n;(n=K.inArray(t,u,n))>-1;)u.splice(n,1),o&&(s>=n&&s--,l>=n&&l--)}),this},has:function(e){return K.inArray(e,u)>-1},empty:function(){return u=[],this},disable:function(){return u=c=r=t,this},disabled:function(){return!u},lock:function(){return c=t,r||p.disable(),this},locked:function(){return!c},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],u&&(!i||c)&&(o?c.push(t):f(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},K.extend({Deferred:function(e){var t=[[\"resolve\",\"done\",K.Callbacks(\"once memory\"),\"resolved\"],[\"reject\",\"fail\",K.Callbacks(\"once memory\"),\"rejected\"],[\"notify\",\"progress\",K.Callbacks(\"memory\")]],n=\"pending\",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return K.Deferred(function(n){K.each(t,function(t,r){var o=r[0],a=e[t];i[r[1]](K.isFunction(a)?function(){var e=a.apply(this,arguments);e&&K.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o+\"With\"](this===i?n:this,[e])}:n[o])}),e=null}).promise()},promise:function(e){return null!=e?K.extend(e,r):r}},i={};return r.pipe=r.then,K.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=a.fire,i[o[0]+\"With\"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=Q.call(arguments),a=o.length,s=1!==a||e&&K.isFunction(e.promise)?a:0,l=1===s?e:K.Deferred(),u=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?Q.call(arguments):i,r===t?l.notifyWith(n,r):--s||l.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);a>i;i++)o[i]&&K.isFunction(o[i].promise)?o[i].promise().done(u(i,r,o)).fail(l.reject).progress(u(i,n,t)):--s;return s||l.resolveWith(r,o),l.promise()}}),K.support=function(){var t,n,r,i,o,a,s,l,u,c,f,p=R.createElement(\"div\");if(p.setAttribute(\"className\",\"t\"),p.innerHTML=\"  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\",n=p.getElementsByTagName(\"*\"),r=p.getElementsByTagName(\"a\")[0],!n||!r||!n.length)return{};i=R.createElement(\"select\"),o=i.appendChild(R.createElement(\"option\")),a=p.getElementsByTagName(\"input\")[0],r.style.cssText=\"top:1px;float:left;opacity:.5\",t={leadingWhitespace:3===p.firstChild.nodeType,tbody:!p.getElementsByTagName(\"tbody\").length,htmlSerialize:!!p.getElementsByTagName(\"link\").length,style:/top/.test(r.getAttribute(\"style\")),hrefNormalized:\"/a\"===r.getAttribute(\"href\"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:\"on\"===a.value,optSelected:o.selected,getSetAttribute:\"t\"!==p.className,enctype:!!R.createElement(\"form\").enctype,html5Clone:\"<:nav></:nav>\"!==R.createElement(\"nav\").cloneNode(!0).outerHTML,boxModel:\"CSS1Compat\"===R.compatMode,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,i.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}if(!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent(\"onclick\",f=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent(\"onclick\"),p.detachEvent(\"onclick\",f)),a=R.createElement(\"input\"),a.value=\"t\",a.setAttribute(\"type\",\"radio\"),t.radioValue=\"t\"===a.value,a.setAttribute(\"checked\",\"checked\"),a.setAttribute(\"name\",\"t\"),p.appendChild(a),s=R.createDocumentFragment(),s.appendChild(p.lastChild),t.checkClone=s.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=a.checked,s.removeChild(a),s.appendChild(p),p.attachEvent)for(u in{submit:!0,change:!0,focusin:!0})l=\"on\"+u,c=l in p,c||(p.setAttribute(l,\"return;\"),c=\"function\"==typeof p[l]),t[u+\"Bubbles\"]=c;return K(function(){var n,r,i,o,a=\"padding:0;margin:0;border:0;display:block;overflow:hidden;\",s=R.getElementsByTagName(\"body\")[0];s&&(n=R.createElement(\"div\"),n.style.cssText=\"visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px\",s.insertBefore(n,s.firstChild),r=R.createElement(\"div\"),n.appendChild(r),r.innerHTML=\"<table><tr><td></td><td>t</td></tr></table>\",i=r.getElementsByTagName(\"td\"),i[0].style.cssText=\"padding:0;margin:0;border:0;display:none\",c=0===i[0].offsetHeight,i[0].style.display=\"\",i[1].style.display=\"none\",t.reliableHiddenOffsets=c&&0===i[0].offsetHeight,r.innerHTML=\"\",r.style.cssText=\"box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;\",t.boxSizing=4===r.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==s.offsetTop,e.getComputedStyle&&(t.pixelPosition=\"1%\"!==(e.getComputedStyle(r,null)||{}).top,t.boxSizingReliable=\"4px\"===(e.getComputedStyle(r,null)||{width:\"4px\"}).width,o=R.createElement(\"div\"),o.style.cssText=r.style.cssText=a,o.style.marginRight=o.style.width=\"0\",r.style.width=\"1px\",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),\"undefined\"!=typeof r.style.zoom&&(r.innerHTML=\"\",r.style.cssText=a+\"width:1px;padding:1px;display:inline;zoom:1\",t.inlineBlockNeedsLayout=3===r.offsetWidth,r.style.display=\"block\",r.style.overflow=\"visible\",r.innerHTML=\"<div></div>\",r.firstChild.style.width=\"5px\",t.shrinkWrapBlocks=3!==r.offsetWidth,n.style.zoom=1),s.removeChild(n),n=r=i=o=null)}),s.removeChild(p),n=r=i=o=a=s=p=null,t}();var ge=/(?:\\{[\\s\\S]*\\}|\\[[\\s\\S]*\\])$/,me=/([A-Z])/g;K.extend({cache:{},deletedIds:[],uuid:0,expando:\"jQuery\"+(K.fn.jquery+Math.random()).replace(/\\D/g,\"\"),noData:{embed:!0,object:\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\",applet:!0},hasData:function(e){return e=e.nodeType?K.cache[e[K.expando]]:e[K.expando],!!e&&!i(e)},data:function(e,n,r,i){if(K.acceptData(e)){var o,a,s=K.expando,l=\"string\"==typeof n,u=e.nodeType,c=u?K.cache:e,f=u?e[s]:e[s]&&s;if(f&&c[f]&&(i||c[f].data)||!l||r!==t)return f||(u?e[s]=f=K.deletedIds.pop()||K.guid++:f=s),c[f]||(c[f]={},u||(c[f].toJSON=K.noop)),(\"object\"==typeof n||\"function\"==typeof n)&&(i?c[f]=K.extend(c[f],n):c[f].data=K.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[K.camelCase(n)]=r),l?(a=o[n],null==a&&(a=o[K.camelCase(n)])):a=o,a}},removeData:function(e,t,n){if(K.acceptData(e)){var r,o,a,s=e.nodeType,l=s?K.cache:e,u=s?e[K.expando]:K.expando;if(l[u]){if(t&&(r=n?l[u]:l[u].data)){K.isArray(t)||(t in r?t=[t]:(t=K.camelCase(t),t=t in r?[t]:t.split(\" \")));for(o=0,a=t.length;a>o;o++)delete r[t[o]];if(!(n?i:K.isEmptyObject)(r))return}(n||(delete l[u].data,i(l[u])))&&(s?K.cleanData([e],!0):K.support.deleteExpando||l!=l.window?delete l[u]:l[u]=null)}}},_data:function(e,t,n){return K.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&K.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute(\"classid\")===t}}),K.fn.extend({data:function(e,n){var i,o,a,s,l,u=this[0],c=0,f=null;if(e===t){if(this.length&&(f=K.data(u),1===u.nodeType&&!K._data(u,\"parsedAttrs\"))){for(a=u.attributes,l=a.length;l>c;c++)s=a[c].name,s.indexOf(\"data-\")||(s=K.camelCase(s.substring(5)),r(u,s,f[s]));K._data(u,\"parsedAttrs\",!0)}return f}return\"object\"==typeof e?this.each(function(){K.data(this,e)}):(i=e.split(\".\",2),i[1]=i[1]?\".\"+i[1]:\"\",o=i[1]+\"!\",K.access(this,function(n){return n===t?(f=this.triggerHandler(\"getData\"+o,[i[0]]),f===t&&u&&(f=K.data(u,e),f=r(u,e,f)),f===t&&i[1]?this.data(i[0]):f):(i[1]=n,void this.each(function(){var t=K(this);t.triggerHandler(\"setData\"+o,i),K.data(this,e,n),t.triggerHandler(\"changeData\"+o,i)}))},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){K.removeData(this,e)})}}),K.extend({queue:function(e,t,n){var r;return e?(t=(t||\"fx\")+\"queue\",r=K._data(e,t),n&&(!r||K.isArray(n)?r=K._data(e,t,K.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||\"fx\";var n=K.queue(e,t),r=n.length,i=n.shift(),o=K._queueHooks(e,t),a=function(){K.dequeue(e,t)};\"inprogress\"===i&&(i=n.shift(),r--),i&&(\"fx\"===t&&n.unshift(\"inprogress\"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+\"queueHooks\";return K._data(e,n)||K._data(e,n,{empty:K.Callbacks(\"once memory\").add(function(){K.removeData(e,t+\"queue\",!0),K.removeData(e,n,!0)})})}}),K.fn.extend({queue:function(e,n){var r=2;return\"string\"!=typeof e&&(n=e,e=\"fx\",r--),arguments.length<r?K.queue(this[0],e):n===t?this:this.each(function(){var t=K.queue(this,e,n);K._queueHooks(this,e),\"fx\"===e&&\"inprogress\"!==t[0]&&K.dequeue(this,e)})},dequeue:function(e){return this.each(function(){K.dequeue(this,e)})},delay:function(e,t){return e=K.fx?K.fx.speeds[e]||e:e,t=t||\"fx\",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||\"fx\",[])},promise:function(e,n){var r,i=1,o=K.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};for(\"string\"!=typeof e&&(n=e,e=t),e=e||\"fx\";s--;)r=K._data(a[s],e+\"queueHooks\"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var ye,ve,be,xe=/[\\t\\r\\n]/g,we=/\\r/g,Te=/^(?:button|input)$/i,Ne=/^(?:button|input|object|select|textarea)$/i,Ce=/^a(?:rea|)$/i,ke=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Ee=K.support.getSetAttribute;K.fn.extend({attr:function(e,t){return K.access(this,K.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){K.removeAttr(this,e)})},prop:function(e,t){return K.access(this,K.prop,e,t,arguments.length>1)},removeProp:function(e){return e=K.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a,s;if(K.isFunction(e))return this.each(function(t){K(this).addClass(e.call(this,t,this.className))});if(e&&\"string\"==typeof e)for(t=e.split(te),n=0,r=this.length;r>n;n++)if(i=this[n],1===i.nodeType)if(i.className||1!==t.length){for(o=\" \"+i.className+\" \",a=0,s=t.length;s>a;a++)o.indexOf(\" \"+t[a]+\" \")<0&&(o+=t[a]+\" \");i.className=K.trim(o)}else i.className=e;return this},removeClass:function(e){var n,r,i,o,a,s,l;if(K.isFunction(e))return this.each(function(t){K(this).removeClass(e.call(this,t,this.className))});if(e&&\"string\"==typeof e||e===t)for(n=(e||\"\").split(te),s=0,l=this.length;l>s;s++)if(i=this[s],1===i.nodeType&&i.className){for(r=(\" \"+i.className+\" \").replace(xe,\" \"),o=0,a=n.length;a>o;o++)for(;r.indexOf(\" \"+n[o]+\" \")>=0;)r=r.replace(\" \"+n[o]+\" \",\" \");i.className=e?K.trim(r):\"\"}return this},toggleClass:function(e,t){var n=typeof e,r=\"boolean\"==typeof t;return this.each(K.isFunction(e)?function(n){K(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if(\"string\"===n)for(var i,o=0,a=K(this),s=t,l=e.split(te);i=l[o++];)s=r?s:!a.hasClass(i),a[s?\"addClass\":\"removeClass\"](i);else(\"undefined\"===n||\"boolean\"===n)&&(this.className&&K._data(this,\"__className__\",this.className),this.className=this.className||e===!1?\"\":K._data(this,\"__className__\")||\"\")})},hasClass:function(e){for(var t=\" \"+e+\" \",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(\" \"+this[n].className+\" \").replace(xe,\" \").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=K.isFunction(e),this.each(function(r){var o,a=K(this);1===this.nodeType&&(o=i?e.call(this,r,a.val()):e,null==o?o=\"\":\"number\"==typeof o?o+=\"\":K.isArray(o)&&(o=K.map(o,function(e){return null==e?\"\":e+\"\"})),n=K.valHooks[this.type]||K.valHooks[this.nodeName.toLowerCase()],n&&\"set\"in n&&n.set(this,o,\"value\")!==t||(this.value=o))});if(o)return n=K.valHooks[o.type]||K.valHooks[o.nodeName.toLowerCase()],n&&\"get\"in n&&(r=n.get(o,\"value\"))!==t?r:(r=o.value,\"string\"==typeof r?r.replace(we,\"\"):null==r?\"\":r)}}}),K.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o=\"select-one\"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(K.support.optDisabled?n.disabled:null!==n.getAttribute(\"disabled\"))||n.parentNode.disabled&&K.nodeName(n.parentNode,\"optgroup\"))){if(t=K(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=K.makeArray(t);return K(e).find(\"option\").each(function(){this.selected=K.inArray(K(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var o,a,s,l=e.nodeType;if(e&&3!==l&&8!==l&&2!==l)return i&&K.isFunction(K.fn[n])?K(e)[n](r):\"undefined\"==typeof e.getAttribute?K.prop(e,n,r):(s=1!==l||!K.isXMLDoc(e),s&&(n=n.toLowerCase(),a=K.attrHooks[n]||(ke.test(n)?ve:ye)),r!==t?null===r?void K.removeAttr(e,n):a&&\"set\"in a&&s&&(o=a.set(e,r,n))!==t?o:(e.setAttribute(n,r+\"\"),r):a&&\"get\"in a&&s&&null!==(o=a.get(e,n))?o:(o=e.getAttribute(n),null===o?t:o))},removeAttr:function(e,t){var n,r,i,o,a=0;if(t&&1===e.nodeType)for(r=t.split(te);a<r.length;a++)i=r[a],i&&(n=K.propFix[i]||i,o=ke.test(i),o||K.attr(e,i,\"\"),e.removeAttribute(Ee?i:n),o&&n in e&&(e[n]=!1))},attrHooks:{type:{set:function(e,t){if(Te.test(e.nodeName)&&e.parentNode)K.error(\"type property can't be changed\");else if(!K.support.radioValue&&\"radio\"===t&&K.nodeName(e,\"input\")){var n=e.value;return e.setAttribute(\"type\",t),n&&(e.value=n),t}}},value:{get:function(e,t){return ye&&K.nodeName(e,\"button\")?ye.get(e,t):t in e?e.value:null},set:function(e,t,n){return ye&&K.nodeName(e,\"button\")?ye.set(e,t,n):void(e.value=t)}}},propFix:{tabindex:\"tabIndex\",readonly:\"readOnly\",\"for\":\"htmlFor\",\"class\":\"className\",maxlength:\"maxLength\",cellspacing:\"cellSpacing\",cellpadding:\"cellPadding\",rowspan:\"rowSpan\",colspan:\"colSpan\",usemap:\"useMap\",frameborder:\"frameBorder\",contenteditable:\"contentEditable\"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!K.isXMLDoc(e),a&&(n=K.propFix[n]||n,o=K.propHooks[n]),r!==t?o&&\"set\"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&\"get\"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode(\"tabindex\");return n&&n.specified?parseInt(n.value,10):Ne.test(e.nodeName)||Ce.test(e.nodeName)&&e.href?0:t}}}}),ve={get:function(e,n){var r,i=K.prop(e,n);return i===!0||\"boolean\"!=typeof i&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?K.removeAttr(e,n):(r=K.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},Ee||(be={name:!0,id:!0,coords:!0},ye=K.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(be[n]?\"\"!==r.value:r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=R.createAttribute(n),e.setAttributeNode(r)),r.value=t+\"\"}},K.each([\"width\",\"height\"],function(e,t){K.attrHooks[t]=K.extend(K.attrHooks[t],{\n" +
                    "    set:function(e,n){return\"\"===n?(e.setAttribute(t,\"auto\"),n):void 0}})}),K.attrHooks.contenteditable={get:ye.get,set:function(e,t,n){\"\"===t&&(t=\"false\"),ye.set(e,t,n)}}),K.support.hrefNormalized||K.each([\"href\",\"src\",\"width\",\"height\"],function(e,n){K.attrHooks[n]=K.extend(K.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null===r?t:r}})}),K.support.style||(K.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+\"\"}}),K.support.optSelected||(K.propHooks.selected=K.extend(K.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),K.support.enctype||(K.propFix.enctype=\"encoding\"),K.support.checkOn||K.each([\"radio\",\"checkbox\"],function(){K.valHooks[this]={get:function(e){return null===e.getAttribute(\"value\")?\"on\":e.value}}}),K.each([\"radio\",\"checkbox\"],function(){K.valHooks[this]=K.extend(K.valHooks[this],{set:function(e,t){return K.isArray(t)?e.checked=K.inArray(K(e).val(),t)>=0:void 0}})});var Se=/^(?:textarea|input|select)$/i,je=/^([^\\.]*|)(?:\\.(.+)|)$/,Ae=/(?:^|\\s)hover(\\.\\S+|)\\b/,Le=/^key/,De=/^(?:mouse|contextmenu)|click/,He=/^(?:focusinfocus|focusoutblur)$/,Fe=function(e){return K.event.special.hover?e:e.replace(Ae,\"mouseenter$1 mouseleave$1\")};K.event={add:function(e,n,r,i,o){var a,s,l,u,c,f,p,d,h,g,m;if(3!==e.nodeType&&8!==e.nodeType&&n&&r&&(a=K._data(e))){for(r.handler&&(h=r,r=h.handler,o=h.selector),r.guid||(r.guid=K.guid++),l=a.events,l||(a.events=l={}),s=a.handle,s||(a.handle=s=function(e){return\"undefined\"==typeof K||e&&K.event.triggered===e.type?t:K.event.dispatch.apply(s.elem,arguments)},s.elem=e),n=K.trim(Fe(n)).split(\" \"),u=0;u<n.length;u++)c=je.exec(n[u])||[],f=c[1],p=(c[2]||\"\").split(\".\").sort(),m=K.event.special[f]||{},f=(o?m.delegateType:m.bindType)||f,m=K.event.special[f]||{},d=K.extend({type:f,origType:c[1],data:i,handler:r,guid:r.guid,selector:o,needsContext:o&&K.expr.match.needsContext.test(o),namespace:p.join(\".\")},h),g=l[f],g||(g=l[f]=[],g.delegateCount=0,m.setup&&m.setup.call(e,i,p,s)!==!1||(e.addEventListener?e.addEventListener(f,s,!1):e.attachEvent&&e.attachEvent(\"on\"+f,s))),m.add&&(m.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),o?g.splice(g.delegateCount++,0,d):g.push(d),K.event.global[f]=!0;e=null}},global:{},remove:function(e,t,n,r,i){var o,a,s,l,u,c,f,p,d,h,g,m=K.hasData(e)&&K._data(e);if(m&&(p=m.events)){for(t=K.trim(Fe(t||\"\")).split(\" \"),o=0;o<t.length;o++)if(a=je.exec(t[o])||[],s=l=a[1],u=a[2],s){for(d=K.event.special[s]||{},s=(r?d.delegateType:d.bindType)||s,h=p[s]||[],c=h.length,u=u?new RegExp(\"(^|\\\\.)\"+u.split(\".\").sort().join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,f=0;f<h.length;f++)g=h[f],!(!i&&l!==g.origType||n&&n.guid!==g.guid||u&&!u.test(g.namespace)||r&&r!==g.selector&&(\"**\"!==r||!g.selector)||(h.splice(f--,1),g.selector&&h.delegateCount--,!d.remove||!d.remove.call(e,g)));0===h.length&&c!==h.length&&((!d.teardown||d.teardown.call(e,u,m.handle)===!1)&&K.removeEvent(e,s,m.handle),delete p[s])}else for(s in p)K.event.remove(e,s+t[o],n,r,!0);K.isEmptyObject(p)&&(delete m.handle,K.removeData(e,\"events\",!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,i,o){if(!i||3!==i.nodeType&&8!==i.nodeType){var a,s,l,u,c,f,p,d,h,g,m=n.type||n,y=[];if(He.test(m+K.event.triggered))return;if(m.indexOf(\"!\")>=0&&(m=m.slice(0,-1),s=!0),m.indexOf(\".\")>=0&&(y=m.split(\".\"),m=y.shift(),y.sort()),(!i||K.event.customEvent[m])&&!K.event.global[m])return;if(n=\"object\"==typeof n?n[K.expando]?n:new K.Event(m,n):new K.Event(m),n.type=m,n.isTrigger=!0,n.exclusive=s,n.namespace=y.join(\".\"),n.namespace_re=n.namespace?new RegExp(\"(^|\\\\.)\"+y.join(\"\\\\.(?:.*\\\\.|)\")+\"(\\\\.|$)\"):null,f=m.indexOf(\":\")<0?\"on\"+m:\"\",!i){a=K.cache;for(l in a)a[l].events&&a[l].events[m]&&K.event.trigger(n,r,a[l].handle.elem,!0);return}if(n.result=t,n.target||(n.target=i),r=null!=r?K.makeArray(r):[],r.unshift(n),p=K.event.special[m]||{},p.trigger&&p.trigger.apply(i,r)===!1)return;if(h=[[i,p.bindType||m]],!o&&!p.noBubble&&!K.isWindow(i)){for(g=p.delegateType||m,u=He.test(g+m)?i:i.parentNode,c=i;u;u=u.parentNode)h.push([u,g]),c=u;c===(i.ownerDocument||R)&&h.push([c.defaultView||c.parentWindow||e,g])}for(l=0;l<h.length&&!n.isPropagationStopped();l++)u=h[l][0],n.type=h[l][1],d=(K._data(u,\"events\")||{})[n.type]&&K._data(u,\"handle\"),d&&d.apply(u,r),d=f&&u[f],d&&K.acceptData(u)&&d.apply&&d.apply(u,r)===!1&&n.preventDefault();return n.type=m,!(o||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||\"click\"===m&&K.nodeName(i,\"a\")||!K.acceptData(i)||!f||!i[m]||(\"focus\"===m||\"blur\"===m)&&0===n.target.offsetWidth||K.isWindow(i)||(c=i[f],c&&(i[f]=null),K.event.triggered=m,i[m](),K.event.triggered=t,!c||!(i[f]=c))),n.result}},dispatch:function(n){n=K.event.fix(n||e.event);var r,i,o,a,s,l,u,c,f,p=(K._data(this,\"events\")||{})[n.type]||[],d=p.delegateCount,h=Q.call(arguments),g=!n.exclusive&&!n.namespace,m=K.event.special[n.type]||{},y=[];if(h[0]=n,n.delegateTarget=this,!m.preDispatch||m.preDispatch.call(this,n)!==!1){if(d&&(!n.button||\"click\"!==n.type))for(o=n.target;o!=this;o=o.parentNode||this)if(o.disabled!==!0||\"click\"!==n.type){for(s={},u=[],r=0;d>r;r++)c=p[r],f=c.selector,s[f]===t&&(s[f]=c.needsContext?K(f,this).index(o)>=0:K.find(f,this,null,[o]).length),s[f]&&u.push(c);u.length&&y.push({elem:o,matches:u})}for(p.length>d&&y.push({elem:this,matches:p.slice(d)}),r=0;r<y.length&&!n.isPropagationStopped();r++)for(l=y[r],n.currentTarget=l.elem,i=0;i<l.matches.length&&!n.isImmediatePropagationStopped();i++)c=l.matches[i],(g||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))&&(n.data=c.data,n.handleObj=c,a=((K.event.special[c.origType]||{}).handle||c.handler).apply(l.elem,h),a!==t&&(n.result=a,a===!1&&(n.preventDefault(),n.stopPropagation())));return m.postDispatch&&m.postDispatch.call(this,n),n.result}},props:\"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),fixHooks:{},keyHooks:{props:\"char charCode key keyCode\".split(\" \"),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:\"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),filter:function(e,n){var r,i,o,a=n.button,s=n.fromElement;return null==e.pageX&&null!=n.clientX&&(r=e.target.ownerDocument||R,i=r.documentElement,o=r.body,e.pageX=n.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?n.toElement:s),!e.which&&a!==t&&(e.which=1&a?1:2&a?3:4&a?2:0),e}},fix:function(e){if(e[K.expando])return e;var t,n,r=e,i=K.event.fixHooks[e.type]||{},o=i.props?this.props.concat(i.props):this.props;for(e=K.Event(r),t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||R),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,i.filter?i.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:\"focusin\"},blur:{delegateType:\"focusout\"},beforeunload:{setup:function(e,t,n){K.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=K.extend(new K.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?K.event.trigger(i,null,t):K.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},K.event.handle=K.event.dispatch,K.removeEvent=R.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r=\"on\"+t;e.detachEvent&&(\"undefined\"==typeof e[r]&&(e[r]=null),e.detachEvent(r,n))},K.Event=function(e,t){return this instanceof K.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?a:o):this.type=e,t&&K.extend(this,t),this.timeStamp=e&&e.timeStamp||K.now(),this[K.expando]=!0,void 0):new K.Event(e,t)},K.Event.prototype={preventDefault:function(){this.isDefaultPrevented=a;var e=this.originalEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=a;var e=this.originalEvent;e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=a,this.stopPropagation()},isDefaultPrevented:o,isPropagationStopped:o,isImmediatePropagationStopped:o},K.each({mouseenter:\"mouseover\",mouseleave:\"mouseout\"},function(e,t){K.event.special[e]={delegateType:t,bindType:t,handle:function(e){{var n,r=this,i=e.relatedTarget,o=e.handleObj;o.selector}return(!i||i!==r&&!K.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),K.support.submitBubbles||(K.event.special.submit={setup:function(){return K.nodeName(this,\"form\")?!1:void K.event.add(this,\"click._submit keypress._submit\",function(e){var n=e.target,r=K.nodeName(n,\"input\")||K.nodeName(n,\"button\")?n.form:t;r&&!K._data(r,\"_submit_attached\")&&(K.event.add(r,\"submit._submit\",function(e){e._submit_bubble=!0}),K._data(r,\"_submit_attached\",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&K.event.simulate(\"submit\",this.parentNode,e,!0))},teardown:function(){return K.nodeName(this,\"form\")?!1:void K.event.remove(this,\"._submit\")}}),K.support.changeBubbles||(K.event.special.change={setup:function(){return Se.test(this.nodeName)?((\"checkbox\"===this.type||\"radio\"===this.type)&&(K.event.add(this,\"propertychange._change\",function(e){\"checked\"===e.originalEvent.propertyName&&(this._just_changed=!0)}),K.event.add(this,\"click._change\",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),K.event.simulate(\"change\",this,e,!0)})),!1):void K.event.add(this,\"beforeactivate._change\",function(e){var t=e.target;Se.test(t.nodeName)&&!K._data(t,\"_change_attached\")&&(K.event.add(t,\"change._change\",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&K.event.simulate(\"change\",this.parentNode,e,!0)}),K._data(t,\"_change_attached\",!0))})},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||\"radio\"!==t.type&&\"checkbox\"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return K.event.remove(this,\"._change\"),!Se.test(this.nodeName)}}),K.support.focusinBubbles||K.each({focus:\"focusin\",blur:\"focusout\"},function(e,t){var n=0,r=function(e){K.event.simulate(t,e.target,K.event.fix(e),!0)};K.event.special[t]={setup:function(){0===n++&&R.addEventListener(e,r,!0)},teardown:function(){0===--n&&R.removeEventListener(e,r,!0)}}}),K.fn.extend({on:function(e,n,r,i,a){var s,l;if(\"object\"==typeof e){\"string\"!=typeof n&&(r=r||n,n=t);for(l in e)this.on(l,n,r,e[l],a);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&(\"string\"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=o;else if(!i)return this;return 1===a&&(s=i,i=function(e){return K().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=K.guid++)),this.each(function(){K.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,a;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,K(e.delegateTarget).off(i.namespace?i.origType+\".\"+i.namespace:i.origType,i.selector,i.handler),this;if(\"object\"==typeof e){for(a in e)this.off(a,n,e[a]);return this}return(n===!1||\"function\"==typeof n)&&(r=n,n=t),r===!1&&(r=o),this.each(function(){K.event.remove(this,e,r,n)})}");
            bufferedWriter.write(",bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return K(this.context).on(e,this.selector,t,n),this},die:function(e,t){return K(this.context).off(e,this.selector||\"**\",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,\"**\"):this.off(t,e||\"**\",n)},trigger:function(e,t){return this.each(function(){K.event.trigger(e,t,this)})},triggerHandler:function(e,t){return this[0]?K.event.trigger(e,t,this[0],!0):void 0},toggle:function(e){var t=arguments,n=e.guid||K.guid++,r=0,i=function(n){var i=(K._data(this,\"lastToggle\"+e.guid)||0)%r;return K._data(this,\"lastToggle\"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};for(i.guid=n;r<t.length;)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),K.each(\"blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu\".split(\" \"),function(e,t){K.fn[t]=function(e,n){return null==n&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Le.test(t)&&(K.event.fixHooks[t]=K.event.keyHooks),De.test(t)&&(K.event.fixHooks[t]=K.event.mouseHooks)}),function(e,t){function n(e,t,n,r){n=n||[],t=t||D;var i,o,a,s,l=t.nodeType;if(!e||\"string\"!=typeof e)return n;if(1!==l&&9!==l)return[];if(a=w(t),!a&&!r&&(i=ne.exec(e)))if(s=i[1]){if(9===l){if(o=t.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(s))&&T(t,o)&&o.id===s)return n.push(o),n}else{if(i[2])return q.apply(n,_.call(t.getElementsByTagName(e),0)),n;if((s=i[3])&&pe&&t.getElementsByClassName)return q.apply(n,_.call(t.getElementsByClassName(s),0)),n}return g(e.replace(G,\"$1\"),t,n,r,a)}function r(e){return function(t){var n=t.nodeName.toLowerCase();return\"input\"===n&&t.type===e}}function i(e){return function(t){var n=t.nodeName.toLowerCase();return(\"input\"===n||\"button\"===n)&&t.type===e}}function o(e){return W(function(t){return t=+t,W(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function a(e,t,n){if(e===t)return n;for(var r=e.nextSibling;r;){if(r===t)return-1;r=r.nextSibling}return 1}function s(e,t){var r,i,o,a,s,l,u,c=$[A][e+\" \"];if(c)return t?0:c.slice(0);for(s=e,l=[],u=b.preFilter;s;){(!r||(i=Z.exec(s)))&&(i&&(s=s.slice(i[0].length)||s),l.push(o=[])),r=!1,(i=ee.exec(s))&&(o.push(r=new L(i.shift())),s=s.slice(r.length),r.type=i[0].replace(G,\" \"));for(a in b.filter)(i=se[a].exec(s))&&(!u[a]||(i=u[a](i)))&&(o.push(r=new L(i.shift())),s=s.slice(r.length),r.type=a,r.matches=i);if(!r)break}return t?s.length:s?n.error(e):$(e,l).slice(0)}function l(e,t,n){var r=t.dir,i=n&&\"parentNode\"===t.dir,o=M++;return t.first?function(t,n,o){for(;t=t[r];)if(i||1===t.nodeType)return e(t,n,o)}:function(t,n,a){if(a){for(;t=t[r];)if((i||1===t.nodeType)&&e(t,n,a))return t}else for(var s,l=F+\" \"+o+\" \",u=l+y;t=t[r];)if(i||1===t.nodeType){if((s=t[A])===u)return t.sizset;if(\"string\"==typeof s&&0===s.indexOf(l)){if(t.sizset)return t}else{if(t[A]=u,e(t,n,a))return t.sizset=!0,t;t.sizset=!1}}}}function u(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function c(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,u=null!=t;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function f(e,t,n,r,i,o){return r&&!r[A]&&(r=f(r)),i&&!i[A]&&(i=f(i,o)),W(function(o,a,s,l){var u,f,p,d=[],g=[],m=a.length,y=o||h(t||\"*\",s.nodeType?[s]:s,[]),v=!e||!o&&t?y:c(y,d,e,s,l),b=n?i||(o?e:m||r)?[]:a:v;if(n&&n(v,b,s,l),r)for(u=c(b,g),r(u,[],s,l),f=u.length;f--;)(p=u[f])&&(b[g[f]]=!(v[g[f]]=p));if(o){if(i||e){if(i){for(u=[],f=b.length;f--;)(p=b[f])&&u.push(v[f]=p);i(null,b=[],u,l)}for(f=b.length;f--;)(p=b[f])&&(u=i?B.call(o,p):d[f])>-1&&(o[u]=!(a[u]=p))}}else b=c(b===a?b.splice(m,b.length):b),i?i(null,a,b,l):q.apply(a,b)})}function p(e){for(var t,n,r,i=e.length,o=b.relative[e[0].type],a=o||b.relative[\" \"],s=o?1:0,c=l(function(e){return e===t},a,!0),d=l(function(e){return B.call(t,e)>-1},a,!0),h=[function(e,n,r){return!o&&(r||n!==E)||((t=n).nodeType?c(e,n,r):d(e,n,r))}];i>s;s++)if(n=b.relative[e[s].type])h=[l(u(h),n)];else{if(n=b.filter[e[s].type].apply(null,e[s].matches),n[A]){for(r=++s;i>r&&!b.relative[e[r].type];r++);return f(s>1&&u(h),s>1&&e.slice(0,s-1).join(\"\").replace(G,\"$1\"),n,r>s&&p(e.slice(s,r)),i>r&&p(e=e.slice(r)),i>r&&e.join(\"\"))}h.push(n)}return u(h)}function d(e,t){var r=t.length>0,i=e.length>0,o=function(a,s,l,u,f){var p,d,h,g=[],m=0,v=\"0\",x=a&&[],w=null!=f,T=E,N=a||i&&b.find.TAG(\"*\",f&&s.parentNode||s),C=F+=null==T?1:Math.E;for(w&&(E=s!==D&&s,y=o.el);null!=(p=N[v]);v++){if(i&&p){for(d=0;h=e[d];d++)if(h(p,s,l)){u.push(p);break}w&&(F=C,y=++o.el)}r&&((p=!h&&p)&&m--,a&&x.push(p))}if(m+=v,r&&v!==m){for(d=0;h=t[d];d++)h(x,g,s,l);if(a){if(m>0)for(;v--;)!x[v]&&!g[v]&&(g[v]=O.call(u));g=c(g)}q.apply(u,g),w&&!a&&g.length>0&&m+t.length>1&&n.uniqueSort(u)}return w&&(F=C,E=T),x};return o.el=0,r?W(o):o}function h(e,t,r){for(var i=0,o=t.length;o>i;i++)n(e,t[i],r);return r}function g(e,t,n,r,i){{var o,a,l,u,c,f=s(e);f.length}if(!r&&1===f.length){if(a=f[0]=f[0].slice(0),a.length>2&&\"ID\"===(l=a[0]).type&&9===t.nodeType&&!i&&b.relative[a[1].type]){if(t=b.find.ID(l.matches[0].replace(ae,\"\"),t,i)[0],!t)return n;e=e.slice(a.shift().length)}for(o=se.POS.test(e)?-1:a.length-1;o>=0&&(l=a[o],!b.relative[u=l.type]);o--)if((c=b.find[u])&&(r=c(l.matches[0].replace(ae,\"\"),re.test(a[0].type)&&t.parentNode||t,i))){if(a.splice(o,1),e=r.length&&a.join(\"\"),!e)return q.apply(n,_.call(r,0)),n;break}}return N(e,f)(r,t,i,n,re.test(e)),n}function m(){}var y,v,b,x,w,T,N,C,k,E,S=!0,j=\"undefined\",A=(\"sizcache\"+Math.random()).replace(\".\",\"\"),L=String,D=e.document,H=D.documentElement,F=0,M=0,O=[].pop,q=[].push,_=[].slice,B=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},W=function(e,t){return e[A]=null==t||t,e},P=function(){var e={},t=[];return W(function(n,r){return t.push(n)>b.cacheLength&&delete e[t.shift()],e[n+\" \"]=r},e)},R=P(),$=P(),I=P(),z=\"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",X=\"(?:\\\\\\\\.|[-\\\\w]|[^\\\\x00-\\\\xa0])+\",U=X.replace(\"w\",\"w#\"),Q=\"([*^$|!~]?=)\",Y=\"\\\\[\"+z+\"*(\"+X+\")\"+z+\"*(?:\"+Q+z+\"*(?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|(\"+U+\")|)|)\"+z+\"*\\\\]\",V=\":(\"+X+\")(?:\\\\((?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\2|([^()[\\\\]]*|(?:(?:\"+Y+\")|[^:]|\\\\\\\\.)*|.*))\\\\)|)\",J=\":(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\"+z+\"*((?:-\\\\d)?\\\\d*)\"+z+\"*\\\\)|)(?=[^-]|$)\",G=new RegExp(\"^\"+z+\"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\"+z+\"+$\",\"g\"),Z=new RegExp(\"^\"+z+\"*,\"+z+\"*\"),ee=new RegExp(\"^\"+z+\"*([\\\\x20\\\\t\\\\r\\\\n\\\\f>+~])\"+z+\"*\"),te=new RegExp(V),ne=/^(?:#([\\w\\-]+)|(\\w+)|\\.([\\w\\-]+))$/,re=/[\\x20\\t\\r\\n\\f]*[+~]/,ie=/h\\d/i,oe=/input|select|textarea|button/i,ae=/\\\\(?!\\\\)/g,se={ID:new RegExp(\"^#(\"+X+\")\"),CLASS:new RegExp(\"^\\\\.(\"+X+\")\"),NAME:new RegExp(\"^\\\\[name=['\\\"]?(\"+X+\")['\\\"]?\\\\]\"),TAG:new RegExp(\"^(\"+X.replace(\"w\",\"w*\")+\")\"),ATTR:new RegExp(\"^\"+Y),PSEUDO:new RegExp(\"^\"+V),POS:new RegExp(J,\"i\"),CHILD:new RegExp(\"^:(only|nth|first|last)-child(?:\\\\(\"+z+\"*(even|odd|(([+-]|)(\\\\d*)n|)\"+z+\"*(?:([+-]|)\"+z+\"*(\\\\d+)|))\"+z+\"*\\\\)|)\",\"i\"),needsContext:new RegExp(\"^\"+z+\"*[>+~]|\"+J,\"i\")},le=function(e){var t=D.createElement(\"div\");try{return e(t)}catch(n){return!1}finally{t=null}},ue=le(function(e){return e.appendChild(D.createComment(\"\")),!e.getElementsByTagName(\"*\").length}),ce=le(function(e){return e.innerHTML=\"<a href='#'></a>\",e.firstChild&&typeof e.firstChild.getAttribute!==j&&\"#\"===e.firstChild.getAttribute(\"href\")}),fe=le(function(e){e.innerHTML=\"<select></select>\";var t=typeof e.lastChild.getAttribute(\"multiple\");return\"boolean\"!==t&&\"string\"!==t}),pe=le(function(e){return e.innerHTML=\"<div class='hidden e'></div><div class='hidden'></div>\",e.getElementsByClassName&&e.getElementsByClassName(\"e\").length?(e.lastChild.className=\"e\",2===e.getElementsByClassName(\"e\").length):!1}),de=le(function(e){e.id=A+0,e.innerHTML=\"<a name='\"+A+\"'></a><div name='\"+A+\"'></div>\",H.insertBefore(e,H.firstChild);var t=D.getElementsByName&&D.getElementsByName(A).length===2+D.getElementsByName(A+0).length;return v=!D.getElementById(A),H.removeChild(e),t});try{_.call(H.childNodes,0)[0].nodeType}catch(he){_=function(e){for(var t,n=[];t=this[e];e++)n.push(t);return n}}n.matches=function(e,t){return n(e,null,null,t)},n.matchesSelector=function(e,t){return n(t,null,null,[e]).length>0},x=n.getText=function(e){var t,n=\"\",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if(\"string\"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=x(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=x(t);return n},w=n.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?\"HTML\"!==t.nodeName:!1},T=n.contains=H.contains?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&1===r.nodeType&&n.contains&&n.contains(r))}:H.compareDocumentPosition?function(e,t){return t&&!!(16&e.compareDocumentPosition(t))}:function(e,t){for(;t=t.parentNode;)if(t===e)return!0;return!1},n.attr=function(e,t){var n,r=w(e);return r||(t=t.toLowerCase()),(n=b.attrHandle[t])?n(e):r||fe?e.getAttribute(t):(n=e.getAttributeNode(t),n?\"boolean\"==typeof e[t]?e[t]?t:null:n.specified?n.value:null:null)},b=n.selectors={cacheLength:50,createPseudo:W,match:se,attrHandle:ce?{}:{href:function(e){return e.getAttribute(\"href\",2)},type:function(e){return e.getAttribute(\"type\")}},find:{ID:v?function(e,t,n){if(typeof t.getElementById!==j&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==j&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==j&&i.getAttributeNode(\"id\").value===e?[i]:t:[]}},TAG:ue?function(e,t){return typeof t.getElementsByTagName!==j?t.getElementsByTagName(e):void 0}:function(e,t){var n=t.getElementsByTagName(e);if(\"*\"===e){for(var r,i=[],o=0;r=n[o];o++)1===r.nodeType&&i.push(r);return i}return n},NAME:de&&function(e,t){return typeof t.getElementsByName!==j?t.getElementsByName(name):void 0},CLASS:pe&&function(e,t,n){return typeof t.getElementsByClassName===j||n?void 0:t.getElementsByClassName(e)}},relative:{\">\":{dir:\"parentNode\",first:!0},\" \":{dir:\"parentNode\"},\"+\":{dir:\"previousSibling\",first:!0},\"~\":{dir:\"previousSibling\"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ae,\"\"),e[3]=(e[4]||e[5]||\"\").replace(ae,\"\"),\"~=\"===e[2]&&(e[3]=\" \"+e[3]+\" \"),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),\"nth\"===e[1]?(e[2]||n.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(\"even\"===e[2]||\"odd\"===e[2])),e[4]=+(e[6]+e[7]||\"odd\"===e[2])):e[2]&&n.error(e[0]),e},PSEUDO:function(e){var t,n;return se.CHILD.test(e[0])?null:(e[3]?e[2]=e[3]:(t=e[4])&&(te.test(t)&&(n=s(t,!0))&&(n=t.indexOf(\")\",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t),e.slice(0,3))}},filter:{ID:v?function(e){return e=e.replace(ae,\"\"),function(t){return t.getAttribute(\"id\")===e}}:function(e){return e=e.replace(ae,\"\"),function(t){var n=typeof t.getAttributeNode!==j&&t.getAttributeNode(\"id\");return n&&n.value===e}},TAG:function(e){return\"*\"===e?function(){return!0}:(e=e.replace(ae,\"\").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=R[A][e+\" \"];return t||(t=new RegExp(\"(^|\"+z+\")\"+e+\"(\"+z+\"|$)\"))&&R(e,function(e){return t.test(e.className||typeof e.getAttribute!==j&&e.getAttribute(\"class\")||\"\")})},ATTR:function(e,t,r){return function(i,o){var a=n.attr(i,e);return null==a?\"!=\"===t:t?(a+=\"\",\"=\"===t?a===r:\"!=\"===t?a!==r:\"^=\"===t?r&&0===a.indexOf(r):\"*=\"===t?r&&a.indexOf(r)>-1:\"$=\"===t?r&&a.substr(a.length-r.length)===r:\"~=\"===t?(\" \"+a+\" \").indexOf(r)>-1:\"|=\"===t?a===r||a.substr(0,r.length+1)===r+\"-\":!1):!0}},CHILD:function(e,t,n,r){return\"nth\"===e?function(e){var t,i,o=e.parentNode;if(1===n&&0===r)return!0;if(o)for(i=0,t=o.firstChild;t&&(1!==t.nodeType||(i++,e!==t));t=t.nextSibling);return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case\"only\":case\"first\":for(;n=n.previousSibling;)if(1===n.nodeType)return!1;if(\"first\"===e)return!0;n=t;case\"last\":for(;n=n.nextSibling;)if(1===n.nodeType)return!1;return!0}}},PSEUDO:function(e,t){var r,i=b.pseudos[e]||b.setFilters[e.toLowerCase()]||n.error(\"unsupported pseudo: \"+e);return i[A]?i(t):i.length>1?(r=[e,e,\"\",t],b.setFilters.hasOwnProperty(e.toLowerCase())?W(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)r=B.call(e,o[a]),e[r]=!(n[r]=o[a])}):function(e){return i(e,0,r)}):i}},pseudos:{not:W(function(e){var t=[],n=[],r=N(e.replace(G,\"$1\"));return r[A]?W(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:W(function(e){return function(t){return n(e,t).length>0}}),contains:W(function(e){return function(t){return(t.textContent||t.innerText||x(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&!!e.checked||\"option\"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!b.pseudos.empty(e)},empty:function(e){var t;for(e=e.firstChild;e;){if(e.nodeName>\"@\"||3===(t=e.nodeType)||4===t)return!1;e=e.nextSibling}return!0},header:function(e){return ie.test(e.nodeName)},text:function(e){var t,n;return\"input\"===e.nodeName.toLowerCase()&&\"text\"===(t=e.type)&&(null==(n=e.getAttribute(\"type\"))||n.toLowerCase()===t)},radio:r(\"radio\"),checkbox:r(\"checkbox\"),file:r(\"file\"),password:r(\"password\"),image:r(\"image\"),submit:i(\"submit\"),reset:i(\"reset\"),button:function(e){var t=e.nodeName.toLowerCase();return\"input\"===t&&\"button\"===e.type||\"button\"===t},input:function(e){return oe.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:o(function(){return[0]}),last:o(function(e,t){return[t-1]}),eq:o(function(e,t,n){return[0>n?n+t:n]}),even:o(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:o(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:o(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:o(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},C=H.compareDocumentPosition?function(e,t){return e===t?(k=!0,0):(e.compareDocumentPosition&&t.compareDocumentPosition?4&e.compareDocumentPosition(t):e.compareDocumentPosition)?-1:1}:function(e,t){if(e===t)return k=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],o=[],s=e.parentNode,l=t.parentNode,u=s;if(s===l)return a(e,t);if(!s)return-1;if(!l)return 1;for(;u;)i.unshift(u),u=u.parentNode;for(u=l;u;)o.unshift(u),u=u.parentNode;n=i.length,r=o.length;for(var c=0;n>c&&r>c;c++)if(i[c]!==o[c])return a(i[c],o[c]);return c===n?a(e,o[c],-1):a(i[c],t,1)},[0,0].sort(C),S=!k,n.uniqueSort=function(e){var t,n=[],r=1,i=0;if(k=S,e.sort(C),k){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return e},n.error=function(e){throw new Error(\"Syntax error, unrecognized expression: \"+e)},N=n.compile=function(e,t){var n,r=[],i=[],o=I[A][e+\" \"];if(!o){for(t||(t=s(e)),n=t.length;n--;)o=p(t[n]),o[A]?r.push(o):i.push(o);o=I(e,d(i,r))}return o},D.querySelectorAll&&function(){var e,t=g,r=/'|\\\\/g,i=/\\=[\\x20\\t\\r\\n\\f]*([^'\"\\]]*)[\\x20\\t\\r\\n\\f]*\\]/g,o=[\":focus\"],a=[\":active\"],l=H.matchesSelector||H.mozMatchesSelector||H.webkitMatchesSelector||H.oMatchesSelector||H.msMatchesSelector;le(function(e){e.innerHTML=\"<select><option selected=''></option></select>\",e.querySelectorAll(\"[selected]\").length||o.push(\"\\\\[\"+z+\"*(?:checked|disabled|ismap|multiple|readonly|selected|value)\"),e.querySelectorAll(\":checked\").length||o.push(\":checked\")}),le(function(e){e.innerHTML=\"<p test=''></p>\",e.querySelectorAll(\"[test^='']\").length&&o.push(\"[*^$]=\"+z+\"*(?:\\\"\\\"|'')\"),e.innerHTML=\"<input type='hidden'/>\",e.querySelectorAll(\":enabled\").length||o.push(\":enabled\",\":disabled\")}),o=new RegExp(o.join(\"|\")),g=function(e,n,i,a,l){if(!a&&!l&&!o.test(e)){var u,c,f=!0,p=A,d=n,h=9===n.nodeType&&e;if(1===n.nodeType&&\"object\"!==n.nodeName.toLowerCase()){for(u=s(e),(f=n.getAttribute(\"id\"))?p=f.replace(r,\"\\\\$&\"):n.setAttribute(\"id\",p),p=\"[id='\"+p+\"'] \",c=u.length;c--;)u[c]=p+u[c].join(\"\");d=re.test(e)&&n.parentNode||n,h=u.join(\",\")}if(h)try{return q.apply(i,_.call(d.querySelectorAll(h),0)),i}catch(g){}finally{f||n.removeAttribute(\"id\")}}return t(e,n,i,a,l)},l&&(le(function(t){e=l.call(t,\"div\");try{l.call(t,\"[test!='']:sizzle\"),a.push(\"!=\",V)}catch(n){}}),a=new RegExp(a.join(\"|\")),n.matchesSelector=function(t,r){if(r=r.replace(i,\"='$1']\"),!w(t)&&!a.test(r)&&!o.test(r))try{var s=l.call(t,r);if(s||e||t.document&&11!==t.document.nodeType)return s}catch(u){}return n(r,null,null,[t]).length>0})}(),b.pseudos.nth=b.pseudos.eq,b.filters=m.prototype=b.pseudos,b.setFilters=new m,n.attr=K.attr,K.find=n,K.expr=n.selectors,K.expr[\":\"]=K.expr.pseudos,K.unique=n.uniqueSort,K.text=n.getText,K.isXMLDoc=n.isXML,K.contains=n.contains}(e);var Me=/Until$/,Oe=/^(?:parents|prev(?:Until|All))/,qe=/^.[^:#\\[\\.,]*$/,_e=K.expr.match.needsContext,Be={children:!0,contents:!0,next:!0,prev:!0};K.fn.extend({find:function(e){var t,n,r,i,o,a,s=this;if(\"string\"!=typeof e)return K(e).filter(function(){for(t=0,n=s.length;n>t;t++)if(K.contains(s[t],this))return!0});for(a=this.pushStack(\"\",\"find\",e),t=0,n=this.length;n>t;t++)if(r=a.length,K.find(e,this[t],a),t>0)for(i=r;i<a.length;i++)for(o=0;r>o;o++)if(a[o]===a[i]){a.splice(i--,1);break}return a},has:function(e){var t,n=K(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(K.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(u(this,e,!1),\"not\",e)},filter:function(e){return this.pushStack(u(this,e,!0),\"filter\",e)},is:function(e){return!!e&&(\"string\"==typeof e?_e.test(e)?K(e,this.context).index(this[0])>=0:K.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=_e.test(e)||\"string\"!=typeof e?K(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(a?a.index(n)>-1:K.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}return o=o.length>1?K.unique(o):o,this.pushStack(o,\"closest\",e)},index:function(e){return e?\"string\"==typeof e?K.inArray(this[0],K(e)):K.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=\"string\"==typeof e?K(e,t):K.makeArray(e&&e.nodeType?[e]:e),r=K.merge(this.get(),n);return this.pushStack(s(n[0])||s(r[0])?r:K.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),K.fn.andSelf=K.fn.addBack,K.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return K.dir(e,\"parentNode\")},parentsUntil:function(e,t,n){return K.dir(e,\"parentNode\",n)},next:function(e){return l(e,\"nextSibling\")},prev:function(e){return l(e,\"previousSibling\")},nextAll:function(e){return K.dir(e,\"nextSibling\")},prevAll:function(e){return K.dir(e,\"previousSibling\")},nextUntil:function(e,t,n){return K.dir(e,\"nextSibling\",n)},prevUntil:function(e,t,n){return K.dir(e,\"previousSibling\",n)},siblings:function(e){return K.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return K.sibling(e.firstChild)},contents:function(e){return K.nodeName(e,\"iframe\")?e.contentDocument||e.contentWindow.document:K.merge([],e.childNodes)}},function(e,t){K.fn[e]=function(n,r){var i=K.map(this,t,n);return Me.test(e)||(r=n),r&&\"string\"==typeof r&&(i=K.filter(r,i)),i=this.length>1&&!Be[e]?K.unique(i):i,this.length>1&&Oe.test(e)&&(i=i.reverse()),this.pushStack(i,e,Q.call(arguments).join(\",\"))}}),K.extend({filter:function(e,t,n){return n&&(e=\":not(\"+e+\")\"),1===t.length?K.find.matchesSelector(t[0],e)?[t[0]]:[]:K.find.matches(e,t)},dir:function(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!K(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var We=\"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",Pe=/ jQuery\\d+=\"(?:null|\\d+)\"/g,Re=/^\\s+/,$e=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,Ie=/<([\\w:]+)/,ze=/<tbody/i,Xe=/<|&#?\\w+;/,Ue=/<(?:script|style|link)/i,Qe=/<(?:script|object|embed|option|style)/i,Ye=new RegExp(\"<(?:\"+We+\")[\\\\s/>]\",\"i\"),Ve=/^(?:checkbox|radio)$/,Je=/checked\\s*(?:[^=]|=\\s*.checked.)/i,Ge=/\\/(java|ecma)script/i,Ke=/^\\s*<!(?:\\[CDATA\\[|\\-\\-)|[\\]\\-]{2}>\\s*$/g,Ze={\n" +
                    "    option:[1,\"<select multiple='multiple'>\",\"</select>\"],legend:[1,\"<fieldset>\",\"</fieldset>\"],thead:[1,\"<table>\",\"</table>\"],tr:[2,\"<table><tbody>\",\"</tbody></table>\"],td:[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],col:[2,\"<table><tbody></tbody><colgroup>\",\"</colgroup></table>\"],area:[1,\"<map>\",\"</map>\"],_default:[0,\"\",\"\"]},et=c(R),tt=et.appendChild(R.createElement(\"div\"));Ze.optgroup=Ze.option,Ze.tbody=Ze.tfoot=Ze.colgroup=Ze.caption=Ze.thead,Ze.th=Ze.td,K.support.htmlSerialize||(Ze._default=[1,\"X<div>\",\"</div>\"]),K.fn.extend({text:function(e){return K.access(this,function(e){return e===t?K.text(this):this.empty().append((this[0]&&this[0].ownerDocument||R).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(K.isFunction(e))return this.each(function(t){K(this).wrapAll(e.call(this,t))});if(this[0]){var t=K(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return this.each(K.isFunction(e)?function(t){K(this).wrapInner(e.call(this,t))}:function(){var t=K(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=K.isFunction(e);return this.each(function(n){K(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){K.nodeName(this,\"body\")||K(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!s(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=K.clean(arguments);return this.pushStack(K.merge(e,this),\"before\",this.selector)}},after:function(){if(!s(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=K.clean(arguments);return this.pushStack(K.merge(this,e),\"after\",this.selector)}},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)(!e||K.filter(e,[n]).length)&&(!t&&1===n.nodeType&&(K.cleanData(n.getElementsByTagName(\"*\")),K.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)for(1===e.nodeType&&K.cleanData(e.getElementsByTagName(\"*\"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return K.clone(this,e,t)})},html:function(e){return K.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Pe,\"\"):t;if(!(\"string\"!=typeof e||Ue.test(e)||!K.support.htmlSerialize&&Ye.test(e)||!K.support.leadingWhitespace&&Re.test(e)||Ze[(Ie.exec(e)||[\"\",\"\"])[1].toLowerCase()])){e=e.replace($e,\"<$1></$2>\");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(K.cleanData(n.getElementsByTagName(\"*\")),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return s(this[0])?this.length?this.pushStack(K(K.isFunction(e)?e():e),\"replaceWith\",e):this:K.isFunction(e)?this.each(function(t){var n=K(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(\"string\"!=typeof e&&(e=K(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;K(this).remove(),t?K(t).before(e):K(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,o,a,s,l=0,u=e[0],c=[],p=this.length;if(!K.support.checkClone&&p>1&&\"string\"==typeof u&&Je.test(u))return this.each(function(){K(this).domManip(e,n,r)});if(K.isFunction(u))return this.each(function(i){var o=K(this);e[0]=u.call(this,i,n?o.html():t),o.domManip(e,n,r)});if(this[0]){if(i=K.buildFragment(e,this,c),a=i.fragment,o=a.firstChild,1===a.childNodes.length&&(a=o),o)for(n=n&&K.nodeName(o,\"tr\"),s=i.cacheable||p-1;p>l;l++)r.call(n&&K.nodeName(this[l],\"table\")?f(this[l],\"tbody\"):this[l],l===s?a:K.clone(a,!0,!0));a=o=null,c.length&&K.each(c,function(e,t){t.src?K.ajax?K.ajax({url:t.src,type:\"GET\",dataType:\"script\",async:!1,global:!1,\"throws\":!0}):K.error(\"no ajax\"):K.globalEval((t.text||t.textContent||t.innerHTML||\"\").replace(Ke,\"\")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),K.buildFragment=function(e,n,r){var i,o,a,s=e[0];return n=n||R,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,1===e.length&&\"string\"==typeof s&&s.length<512&&n===R&&\"<\"===s.charAt(0)&&!Qe.test(s)&&(K.support.checkClone||!Je.test(s))&&(K.support.html5Clone||!Ye.test(s))&&(o=!0,i=K.fragments[s],a=i!==t),i||(i=n.createDocumentFragment(),K.clean(e,n,i,r),o&&(K.fragments[s]=a&&i)),{fragment:i,cacheable:o}},K.fragments={},K.each({appendTo:\"append\",prependTo:\"prepend\",insertBefore:\"before\",insertAfter:\"after\",replaceAll:\"replaceWith\"},function(e,t){K.fn[e]=function(n){var r,i=0,o=[],a=K(n),s=a.length,l=1===this.length&&this[0].parentNode;if((null==l||l&&11===l.nodeType&&1===l.childNodes.length)&&1===s)return a[t](this[0]),this;for(;s>i;i++)r=(i>0?this.clone(!0):this).get(),K(a[i])[t](r),o=o.concat(r);return this.pushStack(o,e,a.selector)}}),K.extend({clone:function(e,t,n){var r,i,o,a;if(K.support.html5Clone||K.isXMLDoc(e)||!Ye.test(\"<\"+e.nodeName+\">\")?a=e.cloneNode(!0):(tt.innerHTML=e.outerHTML,tt.removeChild(a=tt.firstChild)),!(K.support.noCloneEvent&&K.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||K.isXMLDoc(e)))for(d(e,a),r=h(e),i=h(a),o=0;r[o];++o)i[o]&&d(r[o],i[o]);if(t&&(p(e,a),n))for(r=h(e),i=h(a),o=0;r[o];++o)p(r[o],i[o]);return r=i=null,a},clean:function(e,t,n,r){var i,o,a,s,l,u,f,p,d,h,m,y=t===R&&et,v=[];for(t&&\"undefined\"!=typeof t.createDocumentFragment||(t=R),i=0;null!=(a=e[i]);i++)if(\"number\"==typeof a&&(a+=\"\"),a){if(\"string\"==typeof a)if(Xe.test(a)){for(y=y||c(t),f=t.createElement(\"div\"),y.appendChild(f),a=a.replace($e,\"<$1></$2>\"),s=(Ie.exec(a)||[\"\",\"\"])[1].toLowerCase(),l=Ze[s]||Ze._default,u=l[0],f.innerHTML=l[1]+a+l[2];u--;)f=f.lastChild;if(!K.support.tbody)for(p=ze.test(a),d=\"table\"!==s||p?\"<table>\"!==l[1]||p?[]:f.childNodes:f.firstChild&&f.firstChild.childNodes,o=d.length-1;o>=0;--o)K.nodeName(d[o],\"tbody\")&&!d[o].childNodes.length&&d[o].parentNode.removeChild(d[o]);!K.support.leadingWhitespace&&Re.test(a)&&f.insertBefore(t.createTextNode(Re.exec(a)[0]),f.firstChild),a=f.childNodes,f.parentNode.removeChild(f)}else a=t.createTextNode(a);a.nodeType?v.push(a):K.merge(v,a)}if(f&&(a=f=y=null),!K.support.appendChecked)for(i=0;null!=(a=v[i]);i++)K.nodeName(a,\"input\")?g(a):\"undefined\"!=typeof a.getElementsByTagName&&K.grep(a.getElementsByTagName(\"input\"),g);if(n)for(h=function(e){return!e.type||Ge.test(e.type)?r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e):void 0},i=0;null!=(a=v[i]);i++)K.nodeName(a,\"script\")&&h(a)||(n.appendChild(a),\"undefined\"!=typeof a.getElementsByTagName&&(m=K.grep(K.merge([],a.getElementsByTagName(\"script\")),h),v.splice.apply(v,[i+1,0].concat(m)),i+=m.length));return v},cleanData:function(e,t){for(var n,r,i,o,a=0,s=K.expando,l=K.cache,u=K.support.deleteExpando,c=K.event.special;null!=(i=e[a]);a++)if((t||K.acceptData(i))&&(r=i[s],n=r&&l[r])){if(n.events)for(o in n.events)c[o]?K.event.remove(i,o):K.removeEvent(i,o,n.handle);l[r]&&(delete l[r],u?delete i[s]:i.removeAttribute?i.removeAttribute(s):i[s]=null,K.deletedIds.push(r))}}}),function(){var e,t;K.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \\/]([\\w.]+)/.exec(e)||/(webkit)[ \\/]([\\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \\/]([\\w.]+)/.exec(e)||/(msie) ([\\w.]+)/.exec(e)||e.indexOf(\"compatible\")<0&&/(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(e)||[];return{browser:t[1]||\"\",version:t[2]||\"0\"}},e=K.uaMatch(I.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),K.browser=t,K.sub=function(){function e(t,n){return new e.fn.init(t,n)}K.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(n,r){return r&&r instanceof K&&!(r instanceof e)&&(r=e(r)),K.fn.init.call(this,n,r,t)},e.fn.init.prototype=e.fn;var t=e(R);return e}}();var nt,rt,it,ot=/alpha\\([^)]*\\)/i,at=/opacity=([^)]*)/,st=/^(top|right|bottom|left)$/,lt=/^(none|table(?!-c[ea]).+)/,ut=/^margin/,ct=new RegExp(\"^(\"+Z+\")(.*)$\",\"i\"),ft=new RegExp(\"^(\"+Z+\")(?!px)[a-z%]+$\",\"i\"),pt=new RegExp(\"^([-+])=(\"+Z+\")\",\"i\"),dt={BODY:\"block\"},ht={position:\"absolute\",visibility:\"hidden\",display:\"block\"},gt={letterSpacing:0,fontWeight:400},mt=[\"Top\",\"Right\",\"Bottom\",\"Left\"],yt=[\"Webkit\",\"O\",\"Moz\",\"ms\"],vt=K.fn.toggle;K.fn.extend({css:function(e,n){return K.access(this,function(e,n,r){return r!==t?K.style(e,n,r):K.css(e,n)},e,n,arguments.length>1)},show:function(){return v(this,!0)},hide:function(){return v(this)},toggle:function(e,t){var n=\"boolean\"==typeof e;return K.isFunction(e)&&K.isFunction(t)?vt.apply(this,arguments):this.each(function(){(n?e:y(this))?K(this).show():K(this).hide()})}}),K.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=nt(e,\"opacity\");return\"\"===n?\"1\":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{\"float\":K.support.cssFloat?\"cssFloat\":\"styleFloat\"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=K.camelCase(n),u=e.style;if(n=K.cssProps[l]||(K.cssProps[l]=m(u,l)),s=K.cssHooks[n]||K.cssHooks[l],r===t)return s&&\"get\"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,\"string\"===a&&(o=pt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(K.css(e,n)),a=\"number\"),!(null==r||\"number\"===a&&isNaN(r)||(\"number\"===a&&!K.cssNumber[l]&&(r+=\"px\"),s&&\"set\"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=K.camelCase(n);return n=K.cssProps[l]||(K.cssProps[l]=m(e.style,l)),s=K.cssHooks[n]||K.cssHooks[l],s&&\"get\"in s&&(o=s.get(e,!0,i)),o===t&&(o=nt(e,n)),\"normal\"===o&&n in gt&&(o=gt[n]),r||i!==t?(a=parseFloat(o),r||K.isNumeric(a)?a||0:o):o},swap:function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=o[i];return r}}),e.getComputedStyle?nt=function(t,n){var r,i,o,a,s=e.getComputedStyle(t,null),l=t.style;return s&&(r=s.getPropertyValue(n)||s[n],\"\"===r&&!K.contains(t.ownerDocument,t)&&(r=K.style(t,n)),ft.test(r)&&ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=r,r=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),r}:R.documentElement.currentStyle&&(nt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],o=e.style;return null==i&&o&&o[t]&&(i=o[t]),ft.test(i)&&!st.test(t)&&(n=o.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),o.left=\"fontSize\"===t?\"1em\":i,i=o.pixelLeft+\"px\",o.left=n,r&&(e.runtimeStyle.left=r)),\"\"===i?\"auto\":i}),K.each([\"height\",\"width\"],function(e,t){K.cssHooks[t]={get:function(e,n,r){return n?0===e.offsetWidth&&lt.test(nt(e,\"display\"))?K.swap(e,ht,function(){return w(e,t,r)}):w(e,t,r):void 0},set:function(e,n,r){return b(e,n,r?x(e,t,r,K.support.boxSizing&&\"border-box\"===K.css(e,\"boxSizing\")):0)}}}),K.support.opacity||(K.cssHooks.opacity={get:function(e,t){return at.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||\"\")?.01*parseFloat(RegExp.$1)+\"\":t?\"1\":\"\"},set:function(e,t){var n=e.style,r=e.currentStyle,i=K.isNumeric(t)?\"alpha(opacity=\"+100*t+\")\":\"\",o=r&&r.filter||n.filter||\"\";n.zoom=1,t>=1&&\"\"===K.trim(o.replace(ot,\"\"))&&n.removeAttribute&&(n.removeAttribute(\"filter\"),r&&!r.filter)||(n.filter=ot.test(o)?o.replace(ot,i):o+\" \"+i)}}),K(function(){K.support.reliableMarginRight||(K.cssHooks.marginRight={get:function(e,t){return K.swap(e,{display:\"inline-block\"},function(){return t?nt(e,\"marginRight\"):void 0})}}),!K.support.pixelPosition&&K.fn.position&&K.each([\"top\",\"left\"],function(e,t){K.cssHooks[t]={get:function(e,n){if(n){var r=nt(e,t);return ft.test(r)?K(e).position()[t]+\"px\":r}}}})}),K.expr&&K.expr.filters&&(K.expr.filters.hidden=function(e){return 0===e.offsetWidth&&0===e.offsetHeight||!K.support.reliableHiddenOffsets&&\"none\"===(e.style&&e.style.display||nt(e,\"display\"))},K.expr.filters.visible=function(e){return!K.expr.filters.hidden(e)}),K.each({margin:\"\",padding:\"\",border:\"Width\"},function(e,t){K.cssHooks[e+t]={expand:function(n){var r,i=\"string\"==typeof n?n.split(\" \"):[n],o={};for(r=0;4>r;r++)o[e+mt[r]+t]=i[r]||i[r-2]||i[0];return o}},ut.test(e)||(K.cssHooks[e+t].set=b)});var bt=/%20/g,xt=/\\[\\]$/,wt=/\\r?\\n/g,Tt=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Nt=/^(?:select|textarea)/i;K.fn.extend({serialize:function(){return K.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?K.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Nt.test(this.nodeName)||Tt.test(this.type))}).map(function(e,t){var n=K(this).val();return null==n?null:K.isArray(n)?K.map(n,function(e,n){return{name:t.name,value:e.replace(wt,\"\\r\\n\")}}):{name:t.name,value:n.replace(wt,\"\\r\\n\")}}).get()}}),K.param=function(e,n){var r,i=[],o=function(e,t){t=K.isFunction(t)?t():null==t?\"\":t,i[i.length]=encodeURIComponent(e)+\"=\"+encodeURIComponent(t)};if(n===t&&(n=K.ajaxSettings&&K.ajaxSettings.traditional),K.isArray(e)||e.jquery&&!K.isPlainObject(e))K.each(e,function(){o(this.name,this.value)});else for(r in e)N(r,e[r],n,o);return i.join(\"&\").replace(bt,\"+\")};var Ct,kt,Et=/#.*$/,St=/^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/gm,jt=/^(?:about|app|app\\-storage|.+\\-extension|file|res|widget):$/,At=/^(?:GET|HEAD)$/,Lt=/^\\/\\//,Dt=/\\?/,Ht=/<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi,Ft=/([?&])_=[^&]*/,Mt=/^([\\w\\+\\.\\-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+)|)|)/,Ot=K.fn.load,qt={},_t={},Bt=[\"*/\"]+[\"*\"];try{kt=$.href}catch(Wt){kt=R.createElement(\"a\"),kt.href=\"\",kt=kt.href}Ct=Mt.exec(kt.toLowerCase())||[],K.fn.load=function(e,n,r){if(\"string\"!=typeof e&&Ot)return Ot.apply(this,arguments);if(!this.length)return this;var i,o,a,s=this,l=e.indexOf(\" \");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),K.isFunction(n)?(r=n,n=t):n&&\"object\"==typeof n&&(o=\"POST\"),K.ajax({url:e,type:o,dataType:\"html\",data:n,complete:function(e,t){r&&s.each(r,a||[e.responseText,t,e])}}).done(function(e){a=arguments,s.html(i?K(\"<div>\").append(e.replace(Ht,\"\")).find(i):e)}),this},K.each(\"ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend\".split(\" \"),function(e,t){K.fn[t]=function(e){return this.on(t,e)}}),K.each([\"get\",\"post\"],function(e,n){K[n]=function(e,r,i,o){return K.isFunction(r)&&(o=o||i,i=r,r=t),K.ajax({type:n,url:e,data:r,success:i,dataType:o})}}),K.extend({getScript:function(e,n){return K.get(e,t,n,\"script\")},getJSON:function(e,t,n){return K.get(e,t,n,\"json\")},ajaxSetup:function(e,t){return t?E(e,K.ajaxSettings):(t=e,e=K.ajaxSettings),E(e,t),e},ajaxSettings:{url:kt,isLocal:jt.test(Ct[1]),global:!0,type:\"GET\",contentType:\"application/x-www-form-urlencoded; charset=UTF-8\",processData:!0,async:!0,accepts:{xml:\"application/xml, text/xml\",html:\"text/html\",text:\"text/plain\",json:\"application/json, text/javascript\",\"*\":Bt},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:\"responseXML\",text:\"responseText\"},converters:{\"* text\":e.String,\"text html\":!0,\"text json\":K.parseJSON,\"text xml\":K.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:C(qt),ajaxTransport:C(_t),ajax:function(e,n){function r(e,n,r,a){var u,f,v,b,w,N=n;2!==x&&(x=2,l&&clearTimeout(l),s=t,o=a||\"\",T.readyState=e>0?4:0,r&&(b=S(p,T,r)),e>=200&&300>e||304===e?(p.ifModified&&(w=T.getResponseHeader(\"Last-Modified\"),w&&(K.lastModified[i]=w),w=T.getResponseHeader(\"Etag\"),w&&(K.etag[i]=w)),304===e?(N=\"notmodified\",u=!0):(u=j(p,b),N=u.state,f=u.data,v=u.error,u=!v)):(v=N,(!N||e)&&(N=\"error\",0>e&&(e=0))),T.status=e,T.statusText=(n||N)+\"\",u?g.resolveWith(d,[f,N,T]):g.rejectWith(d,[T,N,v]),T.statusCode(y),y=t,c&&h.trigger(\"ajax\"+(u?\"Success\":\"Error\"),[T,p,u?f:v]),m.fireWith(d,[T,N]),c&&(h.trigger(\"ajaxComplete\",[T,p]),--K.active||K.event.trigger(\"ajaxStop\")))}\"object\"==typeof e&&(n=e,e=t),n=n||{};var i,o,a,s,l,u,c,f,p=K.ajaxSetup({},n),d=p.context||p,h=d!==p&&(d.nodeType||d instanceof K)?K(d):K.event,g=K.Deferred(),m=K.Callbacks(\"once memory\"),y=p.statusCode||{},v={},b={},x=0,w=\"canceled\",T={readyState:0,setRequestHeader:function(e,t){if(!x){var n=e.toLowerCase();e=b[n]=b[n]||e,v[e]=t}return this},getAllResponseHeaders:function(){return 2===x?o:null},getResponseHeader:function(e){var n;if(2===x){if(!a)for(a={};n=St.exec(o);)a[n[1].toLowerCase()]=n[2];n=a[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return x||(p.mimeType=e),this},abort:function(e){return e=e||w,s&&s.abort(e),r(0,e),this}};if(g.promise(T),T.success=T.done,T.error=T.fail,T.complete=m.add,T.statusCode=function(e){if(e){var t;if(2>x)for(t in e)y[t]=[y[t],e[t]];else t=e[T.status],T.always(t)}return this},p.url=((e||p.url)+\"\").replace(Et,\"\").replace(Lt,Ct[1]+\"//\"),p.dataTypes=K.trim(p.dataType||\"*\").toLowerCase().split(te),null==p.crossDomain&&(u=Mt.exec(p.url.toLowerCase()),p.crossDomain=!(!u||u[1]===Ct[1]&&u[2]===Ct[2]&&(u[3]||(\"http:\"===u[1]?80:443))==(Ct[3]||(\"http:\"===Ct[1]?80:443)))),p.data&&p.processData&&\"string\"!=typeof p.data&&(p.data=K.param(p.data,p.traditional)),k(qt,p,n,T),2===x)return T;if(c=p.global,p.type=p.type.toUpperCase(),p.hasContent=!At.test(p.type),c&&0===K.active++&&K.event.trigger(\"ajaxStart\"),!p.hasContent&&(p.data&&(p.url+=(Dt.test(p.url)?\"&\":\"?\")+p.data,delete p.data),i=p.url,p.cache===!1)){var N=K.now(),C=p.url.replace(Ft,\"$1_=\"+N);p.url=C+(C===p.url?(Dt.test(p.url)?\"&\":\"?\")+\"_=\"+N:\"\")}(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&T.setRequestHeader(\"Content-Type\",p.contentType),p.ifModified&&(i=i||p.url,K.lastModified[i]&&T.setRequestHeader(\"If-Modified-Since\",K.lastModified[i]),K.etag[i]&&T.setRequestHeader(\"If-None-Match\",K.etag[i])),T.setRequestHeader(\"Accept\",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+(\"*\"!==p.dataTypes[0]?\", \"+Bt+\"; q=0.01\":\"\"):p.accepts[\"*\"]);for(f in p.headers)T.setRequestHeader(f,p.headers[f]);if(!p.beforeSend||p.beforeSend.call(d,T,p)!==!1&&2!==x){w=\"abort\";for(f in{success:1,error:1,complete:1})T[f](p[f]);if(s=k(_t,p,n,T)){T.readyState=1,c&&h.trigger(\"ajaxSend\",[T,p]),p.async&&p.timeout>0&&(l=setTimeout(function(){T.abort(\"timeout\")},p.timeout));try{x=1,s.send(v,r)}catch(E){if(!(2>x))throw E;r(-1,E)}}else r(-1,\"No Transport\");return T}return T.abort()},active:0,lastModified:{},etag:{}});var Pt=[],Rt=/\\?/,$t=/(=)\\?(?=&|$)|\\?\\?/,It=K.now();K.ajaxSetup({jsonp:\"callback\",jsonpCallback:function(){var e=Pt.pop()||K.expando+\"_\"+It++;return this[e]=!0,e}}),K.ajaxPrefilter(\"json jsonp\",function(n,r,i){var o,a,s,l=n.data,u=n.url,c=n.jsonp!==!1,f=c&&$t.test(u),p=c&&!f&&\"string\"==typeof l&&!(n.contentType||\"\").indexOf(\"application/x-www-form-urlencoded\")&&$t.test(l);return\"jsonp\"===n.dataTypes[0]||f||p?(o=n.jsonpCallback=K.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,a=e[o],f?n.url=u.replace($t,\"$1\"+o):p?n.data=l.replace($t,\"$1\"+o):c&&(n.url+=(Rt.test(u)?\"&\":\"?\")+n.jsonp+\"=\"+o),n.converters[\"script json\"]=function(){return s||K.error(o+\" was not called\"),s[0]},n.dataTypes[0]=\"json\",e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Pt.push(o)),s&&K.isFunction(a)&&a(s[0]),s=a=t}),\"script\"):void 0}),K.ajaxSetup({accepts:{script:\"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"},contents:{script:/javascript|ecmascript/},converters:{\"text script\":function(e){return K.globalEval(e),e}}}),K.ajaxPrefilter(\"script\",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type=\"GET\",e.global=!1)}),K.ajaxTransport(\"script\",function(e){if(e.crossDomain){var n,r=R.head||R.getElementsByTagName(\"head\")[0]||R.documentElement;return{send:function(i,o){n=R.createElement(\"script\"),n.async=\"async\",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){(i||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,\"success\"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var zt,Xt=e.ActiveXObject?function(){for(var e in zt)zt[e](0,1)}:!1,Ut=0;K.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&A()||L()}:A,function(e){K.extend(K.support,{ajax:!!e,cors:!!e&&\"withCredentials\"in e})}(K.ajaxSettings.xhr()),K.support.ajax&&K.ajaxTransport(function(n){if(!n.crossDomain||K.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),!n.crossDomain&&!i[\"X-Requested-With\"]&&(i[\"X-Requested-With\"]=\"XMLHttpRequest\");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,f,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=K.noop,Xt&&delete zt[a]),i)4!==l.readyState&&l.abort();else{s=l.status,c=l.getAllResponseHeaders(),f={},p=l.responseXML,p&&p.documentElement&&(f.xml=p);try{f.text=l.responseText}catch(d){}try{u=l.statusText}catch(d){u=\"\"}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=f.text?200:404}}catch(h){i||o(-1,h)}f&&o(s,u,f,c)},n.async?4===l.readyState?setTimeout(r,0):(a=++Ut,Xt&&(zt||(zt={},K(e).unload(Xt)),zt[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var Qt,Yt,Vt=/^(?:toggle|show|hide)$/,Jt=new RegExp(\"^(?:([-+])=|)(\"+Z+\")([a-z%]*)$\",\"i\"),Gt=/queueHooks$/,Kt=[O],Zt={\"*\":[function(e,t){var n,r,i=this.createTween(e,t),o=Jt.exec(t),a=i.cur(),s=+a||0,l=1,u=20;if(o){if(n=+o[2],r=o[3]||(K.cssNumber[e]?\"\":\"px\"),\"px\"!==r&&s){s=K.css(i.elem,e,!0)||n||1;do l=l||\".5\",s/=l,K.style(i.elem,e,s+r);while(l!==(l=i.cur()/a)&&1!==l&&--u)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};K.Animation=K.extend(F,{tweener:function(e,t){K.isFunction(e)?(t=e,e=[\"*\"]):e=e.split(\" \");for(var n,r=0,i=e.length;i>r;r++)n=e[r],Zt[n]=Zt[n]||[],Zt[n].unshift(t)},prefilter:function(e,t){t?Kt.unshift(e):Kt.push(e)}}),K.Tween=q,q.prototype={constructor:q,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||\"swing\",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(K.cssNumber[n]?\"\":\"px\")},cur:function(){var e=q.propHooks[this.prop];return e&&e.get?e.get(this):q.propHooks._default.get(this)},run:function(e){var t,n=q.propHooks[this.prop];return this.pos=t=this.options.duration?K.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):q.propHooks._default.set(this),this}},q.prototype.init.prototype=q.prototype,q.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=K.css(e.elem,e.prop,!1,\"\"),t&&\"auto\"!==t?t:0):e.elem[e.prop]},set:function(e){K.fx.step[e.prop]?K.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[K.cssProps[e.prop]]||K.cssHooks[e.prop])?K.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},q.propHooks.scrollTop=q.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},K.each([\"toggle\",\"show\",\"hide\"],function(e,t){var n=K.fn[t];K.fn[t]=function(r,i,o){return null==r||\"boolean\"==typeof r||!e&&K.isFunction(r)&&K.isFunction(i)?n.apply(this,arguments):this.animate(_(t,!0),r,i,o)}}),K.fn.extend({fadeTo:function(e,t,n,r){return this.filter(y).css(\"opacity\",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=K.isEmptyObject(e),o=K.speed(t,n,r),a=function(){var t=F(this,K.extend({},e),o);i&&t.stop(!0)};return i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return\"string\"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||\"fx\",[]),this.each(function(){var t=!0,n=null!=e&&e+\"queueHooks\",o=K.timers,a=K._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Gt.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem===this&&(null==e||o[n].queue===e)&&(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&K.dequeue(this,e)})}}),K.each({slideDown:_(\"show\"),slideUp:_(\"hide\"),slideToggle:_(\"toggle\"),fadeIn:{opacity:\"show\"},fadeOut:{opacity:\"hide\"},fadeToggle:{opacity:\"toggle\"}},function(e,t){K.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),K.speed=function(e,t,n){var r=e&&\"object\"==typeof e?K.extend({},e):{complete:n||!n&&t||K.isFunction(e)&&e,duration:e,easing:n&&t||t&&!K.isFunction(t)&&t};return r.duration=K.fx.off?0:\"number\"==typeof r.duration?r.duration:r.duration in K.fx.speeds?K.fx.speeds[r.duration]:K.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue=\"fx\"),r.old=r.complete,r.complete=function(){K.isFunction(r.old)&&r.old.call(this),r.queue&&K.dequeue(this,r.queue)},r},K.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},K.timers=[],K.fx=q.prototype.init,K.fx.tick=function(){var e,n=K.timers,r=0;for(Qt=K.now();r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||K.fx.stop(),Qt=t},K.fx.timer=function(e){e()&&K.timers.push(e)&&!Yt&&(Yt=setInterval(K.fx.tick,K.fx.interval))},K.fx.interval=13,K.fx.stop=function(){clearInterval(Yt),Yt=null},K.fx.speeds={slow:600,fast:200,_default:400},K.fx.step={},K.expr&&K.expr.filters&&(K.expr.filters.animated=function(e){return K.grep(K.timers,function(t){return e===t.elem}).length});var en=/^(?:body|html)$/i;K.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){K.offset.setOffset(this,e,t)});var n,r,i,o,a,s,l,u={top:0,left:0},c=this[0],f=c&&c.ownerDocument;if(f)return(r=f.body)===c?K.offset.bodyOffset(c):(n=f.documentElement,K.contains(n,c)?(\"undefined\"!=typeof c.getBoundingClientRect&&(u=c.getBoundingClientRect()),i=B(f),o=n.clientTop||r.clientTop||0,a=n.clientLeft||r.clientLeft||0,s=i.pageYOffset||n.scrollTop,l=i.pageXOffset||n.scrollLeft,{top:u.top+s-o,left:u.left+l-a}):u)},K.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return K.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(K.css(e,\"marginTop\"))||0,n+=parseFloat(K.css(e,\"marginLeft\"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=K.css(e,\"position\");\"static\"===r&&(e.style.position=\"relative\");var i,o,a=K(e),s=a.offset(),l=K.css(e,\"top\"),u=K.css(e,\"left\"),c=(\"absolute\"===r||\"fixed\"===r)&&K.inArray(\"auto\",[l,u])>-1,f={},p={};c?(p=a.position(),i=p.top,o=p.left):(i=parseFloat(l)||0,o=parseFloat(u)||0),K.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+i),null!=t.left&&(f.left=t.left-s.left+o),\"using\"in t?t.using.call(e,f):a.css(f)}},K.fn.extend({position:function(){if(this[0]){var e=this[0],t=this.offsetParent(),n=this.offset(),r=en.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(K.css(e,\"marginTop\"))||0,n.left-=parseFloat(K.css(e,\"marginLeft\"))||0,r.top+=parseFloat(K.css(t[0],\"borderTopWidth\"))||0,r.left+=parseFloat(K.css(t[0],\"borderLeftWidth\"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||R.body;e&&!en.test(e.nodeName)&&\"static\"===K.css(e,\"position\");)e=e.offsetParent;return e||R.body})}}),K.each({scrollLeft:\"pageXOffset\",scrollTop:\"pageYOffset\"},function(e,n){var r=/Y/.test(n);K.fn[e]=function(i){return K.access(this,function(e,i,o){var a=B(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:void(a?a.scrollTo(r?K(a).scrollLeft():o,r?o:K(a).scrollTop()):e[i]=o)},e,i,arguments.length,null)}}),K.each({Height:\"height\",Width:\"width\"},function(e,n){K.each({padding:\"inner\"+e,content:n,\"\":\"outer\"+e},function(r,i){K.fn[i]=function(i,o){var a=arguments.length&&(r||\"boolean\"!=typeof i),s=r||(i===!0||o===!0?\"margin\":\"border\");return K.access(this,function(n,r,i){var o;return K.isWindow(n)?n.document.documentElement[\"client\"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body[\"scroll\"+e],o[\"scroll\"+e],n.body[\"offset\"+e],o[\"offset\"+e],o[\"client\"+e])):i===t?K.css(n,r,i,s):K.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=K,\"function\"==typeof define&&define.amd&&define.amd.jQuery&&define(\"jquery\",[],function(){return K})}(window),window.lofty&&(jQuery.noConflict(),define(\"gallery/jquery/jqueryLatest\",function(){return jQuery}),lofty.config({alias:{jquery:\"gallery/jquery/jqueryLatest\"}})),function(e){var t=0===location.protocol.indexOf(\"https\")?\"https://\":\"http://\",n=function(e){return\"string\"==typeof e?e.replace(/^(?:http:)?\\/\\//i,t):e},r=e.ajax;e.ajax=function(t,i){return\"object\"==typeof t?(i=t,\"undefined\"!=typeof i.url&&(i.url=n(i.url)),r.call(e,i)):r.call(e,n(t),i)}}(jQuery);;");
            System.out.println("write to file success : " + file.getPath());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeScriptOnlyForTablePage(BufferedWriter bufferedWriter, IntrospectedTable introspectedTable) throws IOException {
        bufferedWriter.write("$(function () {\n" +
                "    queryPage(1);\n" +
                "    setLocalStorageItem(\"rightFrameSrc\",\"" + introspectedTable.getFullyQualifiedTable().getIntrospectedTableName().replaceAll("_", "-") + ".html\");\n" +
                "});\n" +
                "\n" +
                "");
    }

    public static void writeTablePage(IntrospectedTable introspectedTable, String htmlPath, String modelUrl, String fileServer, String serverUrl, String basePackage, String aspectPackage) {
        String table = introspectedTable.getBaseRecordType();
        String tableName = table.replaceAll(modelUrl + ".", "");
        File file = null;
        OutputStream outputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/content");
            folder.mkdirs();
            String fileString = htmlPath + "/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + ".html";
            file = new File(fileString);
            file.createNewFile();
            /** 如果文件存在则删除 */
            outputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(outputStream, "utf-8"));
            bufferedWriter.write("<!DOCTYPE html>\n");
            bufferedWriter.write("<html lang=\"zh-CN\">\n");
            bufferedWriter.write("<head>\n");
            bufferedWriter.write("<meta charset=\"UTF-8\">\n");
            bufferedWriter.write("<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n");
            bufferedWriter.write("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\">\n");
            bufferedWriter.write("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\">\n");
            bufferedWriter.write("<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\">\n");
            bufferedWriter.write("<meta name=\"referrer\" content=\"always\">\n");
            bufferedWriter.write("<meta http-equiv=\"Cache-Control\" content=\"max-age=31536000\" />\n");
            bufferedWriter.write("<title>" + tableName + "</title>\n");
            writePageHead(bufferedWriter);
            bufferedWriter.write("<script src=\"content/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + "/js/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + ".js\" type=\"text/javascript\"></script>\n");
            bufferedWriter.write("<script src=\"custom/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + "/js/custom-" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + ".js\" type=\"text/javascript\"></script>\n");
            bufferedWriter.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"content/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + "/css/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + ".css\">\n");
            bufferedWriter.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"custom/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + "/css/custom-" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + ".css\">\n");
            bufferedWriter.write("</head>\n");
            bufferedWriter.write("<body style='font-size:12px;'>\n");
            bufferedWriter.write("<header>\n");
            bufferedWriter.write("<div class='class-div-query-util'>\n");
            MybatisUtilHtmlBack.writeQueryDiv(bufferedWriter, introspectedTable, tableName);
            bufferedWriter.write("</div>\n");
            bufferedWriter.write("<div class='class-div-query-button-and-number'>");
            MybatisUtilHtmlBack.writeNewDiv(bufferedWriter, introspectedTable, tableName);
            bufferedWriter.write("</div>\n");
            bufferedWriter.write("</header>\n");
            bufferedWriter.write("<article class='class-article-content'>\n");
            bufferedWriter.write("<section style='padding-bottom:6px;'>\n");
            bufferedWriter.write("<div class='class-div-article-section-pager-top' ondblclick='queryPage(1)'></div>\n");
            bufferedWriter.write("</section>\n");
            bufferedWriter.write("<section style='padding-bottom:6px;'>\n");
            bufferedWriter.write("<table class='table class-table-article-section-content'></table>\n");
            bufferedWriter.write("</section>\n");
            bufferedWriter.write("<section style='padding-bottom:6px;'>\n");
            bufferedWriter.write("<div class='class-div-article-section-pager-bottom' ondblclick='queryPage(1)'></div>\n");
            bufferedWriter.write("</section>\n");
            bufferedWriter.write("</article>\n");
            bufferedWriter.write("</body>\n");
            bufferedWriter.write("</html>\n");
            System.out.println("write to file success : " + file.getPath());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(outputStream, bufferedWriter);
        }
    }

    public static void writeNewDiv(BufferedWriter bufferedWriter, IntrospectedTable introspectedTable, String tableName) throws IOException {
        bufferedWriter.write("<button title='增加一条记录' style='padding:6px;font-size:12px;'  class='btn class-button-query' onclick='addLine()' ><image class='class-image-icon' src='content/page-common/image/new.svg' /></button>" +
                "<span class='class-custom-buttons class-custom-buttons-" + tableName + "'>&nbsp;</span>" +
                "</div>" +
                "");
        bufferedWriter.write("<div class='class-div-add-line' style='display:none'>");
        bufferedWriter.write("<div style='height:31px;padding-bottom:6px;' class='class-div-add-line-button'>" +
                "<button title='确认增加记录' class='btn class-button-query' onclick='submitThisLineDiv()' ><image class='class-image-icon' src='content/page-common/image/yes.svg' /></button>" +
                "<button title='取消增加记录' class='btn class-button-query' onclick='closeThisLineDiv()' ><image class='class-image-icon' src='content/page-common/image/no.svg' /></button>" +
                "</div>");
        List<IntrospectedColumn> introspectedColumns = introspectedTable.getAllColumns();
        Iterator<IntrospectedColumn> iterator = introspectedColumns.iterator();
        while (iterator.hasNext()) {
            IntrospectedColumn introspectedColumn = iterator.next();
            String columnName = introspectedColumn.getJavaProperty();
            if (introspectedColumn.isBLOBColumn()) {
                bufferedWriter.write("<div class='class-div-add-line-column' style='padding-bottom:6px;'>" + columnName +
                        " : <div type=text style='height:366px' class='class-input-add-line-column class-input-add-line-" + columnName +
                        "' ></div>\n" +
                        "<script>\n" +
                        "$(function () {\n" +
                        "    $.trumbowyg.svgPath = 'content/page-common/css/icons.svg';\n" +
                        "    $('.class-input-add-line-" + columnName + "').trumbowyg();\n" +
                        "});\n" +
                        "</script>\n" +
                        "</div>\n");
            } else {
                bufferedWriter.write("<div class='class-div-add-line-column' style='padding-bottom:6px;'>" + columnName +
                        " : \n" +
                        "<input type=text style='width:366px;' class='class-input-666666-" + columnName + " class-input-add-line-column class-input-add-line-" + columnName +
                        "' />\n" +
                        "<button style='margin-left:6px;background-color:#f6f6f6;border:1px solid #666666;width:16px;height:16px;' " +
                        "class='class-button-after-input class-button-" + tableName + "-" + columnName + " class-button-plus-" + columnName + "  class-button-" + columnName + "' " +
                        "number=\"666666\"" +
                        "></button>\n" +
                        "<span>" + introspectedColumn.getRemarks() + "</span>" +
                        "</div>\n");
            }
        }
    }

    public static void writeQueryDiv(BufferedWriter bufferedWriter, IntrospectedTable introspectedTable, String tableName) throws
            IOException {
        bufferedWriter.write("<div style='margin-bottom:6px;'>" +
                "<a style='color:black;margin-right:6px;' href='#' onclick=\"gotoIndex()\"><image src='content/page-common/image/home.svg' class='class-image-icon'>home</a>" +
                "<a style='color:black;' href='" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + ".html'>" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + "</a>" +
                "</div>\n" +
                "<div class='class-show-hide-button'>" +
                "<button title='展示查找条件' class='btn class-button-query' \n" +
                "style='padding:6px;cursor:pointer' onclick=\"$('.columnCondition').show();$('.class-query-div').show();\">" +
                "<image class='class-image-icon' src='content/page-common/image/expand.svg' /></button>" +
                "<button title='收起查找条件' class='btn class-button-query' style='padding:6px;cursor:pointer' onclick=\"$('.columnCondition').hide();\">" +
                "<image class='class-image-icon' src='content/page-common/image/hide.svg' /></button>" +
                "<button title='按照条件查找' class='btn class-button-query' style='padding:6px;cursor:pointer' onclick='queryPage(1)' >" +
                "<image class='class-image-icon' src='content/page-common/image/search.svg' /></button>" +
                "<button title='按照条件查找' class='btn class-button-query' style='padding:6px;cursor:pointer' onclick='clearQueryCondition()' >" +
                "<image class='class-image-icon' src='content/page-common/image/clear.svg' /></button>" +
                "<span style='padding:6px;font-size:12px;'>每页条数：</span>" +
                "<select style='padding:6px;font-size:12px;' class='class-select-limit'>" +
                "<option value='10' selected>10</option><option value='20'>20</option><option value='50'>50</option>" +
                "<option value='100'>100</option></select>" +
                "</div>" +
                "<div class='class-query-div' style='display:none'>\n");
        bufferedWriter.write("<table class='table columnCondition'>");
        writeQueryDivHead(bufferedWriter, introspectedTable);
        bufferedWriter.write("<tr>");
        List<IntrospectedColumn> introspectedColumns = introspectedTable.getAllColumns();
        Iterator<IntrospectedColumn> iterator = introspectedColumns.iterator();
        while (iterator.hasNext()) {
            IntrospectedColumn introspectedColumn = iterator.next();
            if (introspectedColumn.isBLOBColumn()) {
            } else {
                FullyQualifiedJavaType fullyQualifiedJavaType = introspectedColumn
                        .getFullyQualifiedJavaType();
                String columnName = introspectedColumn.getJavaProperty();
                if (fullyQualifiedJavaType.isPrimitive()) {
                    if ("boolean".equals(fullyQualifiedJavaType.getFullyQualifiedName())) {
                        bufferedWriter.write("<td style='vertical-align:top'><div title='(类型boolean,填true/false)'style='text-align:left;margin:6px;' class='columnCondition'><span>" + columnName + " = </span><input style='width:26%' type='text' class='class-" + columnName + "' /></div></td>\n");
                    } else if ("byte".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                            || "double".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                            || "float".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                            || "int".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                            || "long".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                            || "short".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                    ) {
                        bufferedWriter.write("<td style='vertical-align:top'>\n");
                        bufferedWriter.write("<div title='(类型" + fullyQualifiedJavaType.getFullyQualifiedName() + ",填数字)'style='text-align:left;margin:6px;' class='columnCondition'><span>" + columnName + " = </span><input style='width:26%' type='text' class='class-" + columnName + "' /> </div>\n");
                        bufferedWriter.write("<div title='(类型" + fullyQualifiedJavaType.getFullyQualifiedName() + ",填数字)' style='text-align:left;margin:6px;'>" + columnName + " != </span><input style='width:26%' type='text' class='class-" + columnName + "-not' /></div>\n");
                        bufferedWriter.write("<div title='" + columnName + " 范围查询 : 'style='text-align:left;margin:6px;' class='columnCondition'><span>" + columnName + " in </span><input style='width:26%' type='text' class='class-" + columnName + "-min' /> - <input style='width:26%' type='text' class='class-" + columnName + "-max' /></div>\n");
                        bufferedWriter.write("</td>\n");
                    } else if ("char".equals(fullyQualifiedJavaType.getFullyQualifiedName())) {
                        bufferedWriter.write("<td style='vertical-align:top'>\n");
                        bufferedWriter.write("<div title='(查询方式: =" + columnName + ")'style='text-align:left;margin:6px;' class='columnCondition'><span>" + columnName + " = </span><input style='width:26%' type='text' class='class-" + columnName + "' /> </div>\n");
                        bufferedWriter.write("<div title='(查询方式: !=" + columnName + "，输入空格就是判断非空了)'style='text-align:left;margin:6px;' class='columnCondition'><span>" + columnName + " != </span><input style='width:26%' type='text' class='class-" + columnName + "-not' /></div>\n");
                        bufferedWriter.write("</td>\n");
                    }
                } else if ("java.lang.Boolean".equals(fullyQualifiedJavaType.getFullyQualifiedName())) {
                    bufferedWriter.write("<td style='vertical-align:top'>\n" +
                            "<div title='(类型boolean,填true/false)'style='text-align:left;margin:6px;' class='columnCondition'><span>" + columnName + " = </span><input style='width:26%' type='text' class='class-" + columnName + "' /></div>" +
                            "</td>\n");
                } else if ("java.lang.Byte".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.lang.Double".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.lang.Integer".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.lang.Long".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.lang.Short".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.lang.BigDecimal".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                ) {
                    bufferedWriter.write("<td style='vertical-align:top'>\n");
                    bufferedWriter.write("<div title='(类型" + fullyQualifiedJavaType.getFullyQualifiedName() + ",填数字)'style='text-align:left;margin:6px;' class='columnCondition'><span>" + columnName + " = </span><input style='width:26%' type='text' class='class-" + columnName + "' /> </div>");
                    bufferedWriter.write("<div style='text-align:left;margin:6px;'>" + columnName + " != </span><input style='width:26%' type='text' class='class-" + columnName + "-not' /></div>\n");
                    bufferedWriter.write("<div title='" + columnName + " 范围查询 : 'style='text-align:left;margin:6px;' class='columnCondition'><span>" + columnName + " in </span><input style='width:26%' type='text' class='class-" + columnName + "-min' /> - <input style='width:26%' type='text' class='class-" + columnName + "-max' /></div>");
                    bufferedWriter.write("</td>\n");
                } else if ("java.lang.String".equals(fullyQualifiedJavaType.getFullyQualifiedName())) {
                    bufferedWriter.write("<td style='vertical-align:top'>\n");
                    bufferedWriter.write("<div title='(查询方式: =" + columnName + ")'style='text-align:left;margin:6px;' class='columnCondition'><span>" + columnName + " = </span><input style='width:26%' type='text' class='class-" + columnName + "' /></div>\n");
                    bufferedWriter.write("<div title='(查询方式: !=" + columnName + "，输入空格就是判断非空了)'style='text-align:left;margin:6px;' class='columnCondition'><span>" + columnName + " != </span><input style='width:26%' type='text' class='class-" + columnName + "-not' /></div>\n");
                    bufferedWriter.write("<div title='(后置查询: like (%" + columnName + "))'style='text-align:left;margin:6px;' class='columnCondition'><span>like %" + columnName + " : </span><input style='width:26%' type='text' class='class-" + columnName + "-prefix' /></div>\n");
                    bufferedWriter.write("<div title='(前置查询: like (" + columnName + "%))'style='text-align:left;margin:6px;' class='columnCondition'><span>like " + columnName + "% : </span><input style='width:26%' type='text' class='class-" + columnName + "-suffix' /></div>\n");
                    bufferedWriter.write("<div title='(通配查询: like (%" + columnName + "%))'style='text-align:left;margin:6px;' class='columnCondition'><span>like %" + columnName + "% : </span><input style='width:26%' type='text' class='class-" + columnName + "-like' /></div>\n");
                    bufferedWriter.write("</td>\n");
                } else if ("java.util.Date".equals(fullyQualifiedJavaType.getFullyQualifiedName())) {
                    bufferedWriter.write("<td style='vertical-align:top'>\n");
                    bufferedWriter.write("<div title='(类型" + fullyQualifiedJavaType.getFullyQualifiedName() + ",填日期时间例如2018/6/6 6:6:6)'style='text-align:left;margin:6px;' class='columnCondition'><span>" + columnName + " = </span><input style='width:26%' type='text' class='class-" + columnName + "' /></div>\n");
                    bufferedWriter.write("<div title='(类型" + fullyQualifiedJavaType.getFullyQualifiedName() + ",填日期时间例如2018/6/6 6:6:6)'style='text-align:left;margin:6px;' class='columnCondition'><span>" + columnName + " != </span><input style='width:26%' type='text' class='class-" + columnName + "-not' /></div>\n");
                    bufferedWriter.write("<div title='" + columnName + " 范围查询 : 'style='text-align:left;margin:6px;' class='columnCondition'><span>" + columnName + " in </span><input style='width:26%' type='text' class='class-" + columnName + "-min' /> - <input style='width:26%' type='text' class='class-" + columnName + "-max' /></div>\n");
                    bufferedWriter.write("</td>\n");
                } else {
                    bufferedWriter.write("<td style='vertical-align:top'>" +
                            "<div title='(查询方式: =" + columnName + ")'style='text-align:left;margin:6px;' class='columnCondition'><span>" + columnName + " = </span><input style='width:26%' type='text' class='class-" + columnName + "' /></div>\n");
                    bufferedWriter.write("<div title='(查询方式: !=" + columnName + "，输入空格就是判断非空了)'style='text-align:left;margin:6px;' class='columnCondition'><span>" + columnName + " != </span><input style='width:26%' type='text' class='class-" + columnName + "-not' /></div>\n" +
                            "</td>\n");
                }
            }
        }
        bufferedWriter.write("</tr></table></div>\n");
    }

    public static void writeQueryDivHead(BufferedWriter bufferedWriter, IntrospectedTable introspectedTable) throws IOException {
        List<IntrospectedColumn> introspectedColumns = introspectedTable.getAllColumns();
        Iterator<IntrospectedColumn> iterator = introspectedColumns.iterator();
        bufferedWriter.write("<tr>\n");
        while (iterator.hasNext()) {
            IntrospectedColumn introspectedColumn = iterator.next();
            FullyQualifiedJavaType fullyQualifiedJavaType = introspectedColumn
                    .getFullyQualifiedJavaType();
            String columnName = introspectedColumn.getJavaProperty();
            bufferedWriter.write("<th title='" + introspectedColumn.getRemarks() + "'>" + columnName + "</th>");
        }
        bufferedWriter.write("</tr>");
    }

    public static void writeScriptQueryFunction(BufferedWriter bufferedWriter, IntrospectedTable
            introspectedTable, String tableName) throws IOException {
        writeScriptForQueryPage(bufferedWriter, introspectedTable, tableName);
        writeScriptForClearQueryCondition(bufferedWriter, introspectedTable, tableName);
        writeScriptForEditLine(bufferedWriter, introspectedTable);
        writeScriptForCancelThisLine(bufferedWriter, introspectedTable);
        writeScriptForConfirmThisLine(bufferedWriter, introspectedTable, tableName);
        writeScriptForAddLine(bufferedWriter, introspectedTable, tableName);
        writeScriptForCloseThisLineDiv(bufferedWriter, introspectedTable, tableName);
        writeScriptForSubmitThisLineDiv(bufferedWriter, introspectedTable, tableName);
        writeScriptForDeleteThisLineDiv(bufferedWriter, introspectedTable, tableName);
    }

    private static void writeScriptForClearQueryCondition(BufferedWriter bufferedWriter, IntrospectedTable introspectedTable, String tableName) throws
            IOException {
        List<IntrospectedColumn> introspectedColumns = introspectedTable.getAllColumns();
        bufferedWriter.write("var clearQueryCondition=function(){\n");
        Iterator<IntrospectedColumn> iterator = introspectedColumns.iterator();
        while (iterator.hasNext()) {
            IntrospectedColumn introspectedColumn = iterator.next();
            if (introspectedColumn.isBLOBColumn()) {
            } else {
                FullyQualifiedJavaType fullyQualifiedJavaType = introspectedColumn
                        .getFullyQualifiedJavaType();
                String columnName = introspectedColumn.getJavaProperty();
                if (fullyQualifiedJavaType.isPrimitive()) {
                    if ("boolean".equals(fullyQualifiedJavaType.getFullyQualifiedName())) {
                        bufferedWriter.write("if($('.class-" + columnName + "').val()!=undefined && $('.class-" + columnName + "').val()!=''){\n$('.class-" + columnName + "').val('');\n}\n");
                    } else if ("byte".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                            || "double".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                            || "float".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                            || "int".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                            || "long".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                            || "short".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                    ) {
                        bufferedWriter.write("if($('.class-" + columnName + "').val()!=undefined && $('.class-" + columnName + "').val()!=''){\n$('.class-" + columnName + "').val('');\n}\n");
                        bufferedWriter.write("if($('.class-" + columnName + "-max').val()!=undefined && $('.class-" + columnName + "-max').val()!=''){\n$('.class-" + columnName + "-max').val('');\n}\n");
                        bufferedWriter.write("if($('.class-" + columnName + "-min').val()!=undefined && $('.class-" + columnName + "-min').val()!=''){\n$('.class-" + columnName + "-min').val('');\n}\n");
                        bufferedWriter.write("if($('.class-" + columnName + "-not').val()!=undefined && $('.class-" + columnName + "-not').val()!=''){\n$('.class-" + columnName + "-not').val('');\n}\n");
                    } else if ("char".equals(fullyQualifiedJavaType.getFullyQualifiedName())) {
                        bufferedWriter.write("if($('.class-" + columnName + "').val()!=undefined && $('.class-" + columnName + "').val()!=''){\n$('.class-" + columnName + "').val('');\n}\n");
                        bufferedWriter.write("if($('.class-" + columnName + "-not').val()!=undefined && $('.class-" + columnName + "-not').val()!=''){\n$('.class-" + columnName + "-not').val('');\n}\n");
                    }
                } else if ("java.lang.Boolean".equals(fullyQualifiedJavaType.getFullyQualifiedName())) {
                    bufferedWriter.write("if($('.class-" + columnName + "').val()!=undefined && $('.class-" + columnName + "').val()!=''){\n$('.class-" + columnName + "').val('');\n}\n");
                } else if ("java.lang.Byte".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.lang.Double".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.lang.Integer".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.lang.Long".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.lang.Short".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.lang.BigDecimal".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.util.Date".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                ) {
                    bufferedWriter.write("if($('.class-" + columnName + "').val()!=undefined && $('.class-" + columnName + "').val()!=''){\n$('.class-" + columnName + "').val('');\n}\n");
                    bufferedWriter.write("if($('.class-" + columnName + "-max').val()!==undefined &&  $('.class-" + columnName + "-max').val()!=''){\n$('.class-" + columnName + "-max').val('');\n}\n");
                    bufferedWriter.write("if($('.class-" + columnName + "-min').val()!==undefined &&  $('.class-" + columnName + "-min').val()!=''){\n$('.class-" + columnName + "-min').val('');\n}\n");
                    bufferedWriter.write("if($('.class-" + columnName + "-not').val()!==undefined &&  $('.class-" + columnName + "-not').val()!=''){\n$('.class-" + columnName + "-not').val('');\n}\n");
                } else if ("java.lang.String".equals(fullyQualifiedJavaType.getFullyQualifiedName())) {
                    bufferedWriter.write("if($('.class-" + columnName + "').val()!==undefined &&  $('.class-" + columnName + "').val()!=''){\n$('.class-" + columnName + "').val('');\n}\n");
                    bufferedWriter.write("if($('.class-" + columnName + "-suffix').val()!==undefined &&  $('.class-" + columnName + "-suffix').val()!=''){\n$('.class-" + columnName + "-suffix').val('');\n}\n");
                    bufferedWriter.write("if($('.class-" + columnName + "-prefix').val()!==undefined &&  $('.class-" + columnName + "-prefix').val()!=''){\n$('.class-" + columnName + "-prefix').val('');\n}\n");
                    bufferedWriter.write("if($('.class-" + columnName + "-like').val()!==undefined &&  $('.class-" + columnName + "-like').val()!=''){\n$('.class-" + columnName + "-like').val('');\n}\n");
                    bufferedWriter.write("if($('.class-" + columnName + "-not').val()!==undefined &&  $('.class-" + columnName + "-not').val()!=''){\n$('.class-" + columnName + "-not').val('');\n}\n");
                }
            }
        }
        bufferedWriter.write("queryPage(1);\n" +
                "};\n");
    }

    private static void writeScriptForQueryPage(BufferedWriter bufferedWriter, IntrospectedTable introspectedTable, String tableName) throws
            IOException {
        List<IntrospectedColumn> introspectedColumns = introspectedTable.getAllColumns();
        bufferedWriter.write("var queryPage=function(page){\n");
        bufferedWriter.write("$('.class-table-article-section-content').html(loadingImage);\n");
        bufferedWriter.write("var limit = $('.class-select-limit').val();\n");
        bufferedWriter.write("var token=getLocalStorageItem(\"token\");\n");
        bufferedWriter.write("if(token==undefined || token==\"\"){gotoLoginForContent()}\n");
        bufferedWriter.write("var queryString=\"\";\n");
        bufferedWriter.write(" queryString+=\"page=\"+page+\"&limit=\"+limit;\n");
        Iterator<IntrospectedColumn> iterator = introspectedColumns.iterator();
        while (iterator.hasNext()) {
            IntrospectedColumn introspectedColumn = iterator.next();
            if (introspectedColumn.isBLOBColumn()) {
            } else {
                FullyQualifiedJavaType fullyQualifiedJavaType = introspectedColumn
                        .getFullyQualifiedJavaType();
                String columnName = introspectedColumn.getJavaProperty();
                if (fullyQualifiedJavaType.isPrimitive()) {
                    if ("boolean".equals(fullyQualifiedJavaType.getFullyQualifiedName())) {
                        bufferedWriter.write("if($('.class-" + columnName + "').val()!=undefined && $('.class-" + columnName + "').val()!=''){\nqueryString+='&'+'" + columnName + "='+$('.class-" + columnName + "').val();\n}\n");
                    } else if ("byte".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                            || "double".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                            || "float".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                            || "int".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                            || "long".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                            || "short".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                    ) {
                        bufferedWriter.write("if($('.class-" + columnName + "').val()!=undefined && $('.class-" + columnName + "').val()!=''){\nqueryString+='&'+'" + columnName + "='+$('.class-" + columnName + "').val();\n}\n");
                        bufferedWriter.write("if($('.class-" + columnName + "-max').val()!=undefined && $('.class-" + columnName + "-max').val()!=''){\nqueryString+='&'+'" + columnName + "-max='+$('.class-" + columnName + "-max').val();\n}\n");
                        bufferedWriter.write("if($('.class-" + columnName + "-min').val()!=undefined && $('.class-" + columnName + "-min').val()!=''){\nqueryString+='&'+'" + columnName + "-min='+$('.class-" + columnName + "-min').val();\n}\n");
                        bufferedWriter.write("if($('.class-" + columnName + "-not').val()!=undefined && $('.class-" + columnName + "-not').val()!=''){\nqueryString+='&'+'" + columnName + "-not='+$('.class-" + columnName + "-not').val();\n}\n");
                    } else if ("char".equals(fullyQualifiedJavaType.getFullyQualifiedName())) {
                        bufferedWriter.write("if($('.class-" + columnName + "').val()!=undefined && $('.class-" + columnName + "').val()!=''){\nqueryString+='&'+'" + columnName + "='+$('.class-" + columnName + "').val();\n}\n");
                        bufferedWriter.write("if($('.class-" + columnName + "-not').val()!=undefined && $('.class-" + columnName + "-not').val()!=''){\nqueryString+='&'+'" + columnName + "-not='+$('.class-" + columnName + "-not').val();\n}\n");
                    }
                } else if ("java.lang.Boolean".equals(fullyQualifiedJavaType.getFullyQualifiedName())) {
                    bufferedWriter.write("if($('.class-" + columnName + "').val()!=undefined && $('.class-" + columnName + "').val()!=''){\nqueryString+='&'+'" + columnName + "='+$('.class-" + columnName + "').val();\n}\n");
                } else if ("java.lang.Byte".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.lang.Double".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.lang.Integer".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.lang.Long".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.lang.Short".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.lang.BigDecimal".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                        || "java.util.Date".equals(fullyQualifiedJavaType.getFullyQualifiedName())
                ) {
                    bufferedWriter.write("if($('.class-" + columnName + "').val()!=undefined && $('.class-" + columnName + "').val()!=''){\nqueryString+='&'+'" + columnName + "='+$('.class-" + columnName + "').val();\n}\n");
                    bufferedWriter.write("if($('.class-" + columnName + "-max').val()!==undefined &&  $('.class-" + columnName + "-max').val()!=''){\nqueryString+='&'+'" + columnName + "-max='+$('.class-" + columnName + "-max').val();\n}\n");
                    bufferedWriter.write("if($('.class-" + columnName + "-min').val()!==undefined &&  $('.class-" + columnName + "-min').val()!=''){\nqueryString+='&'+'" + columnName + "-min='+$('.class-" + columnName + "-min').val();\n}\n");
                    bufferedWriter.write("if($('.class-" + columnName + "-not').val()!==undefined &&  $('.class-" + columnName + "-not').val()!=''){\nqueryString+='&'+'" + columnName + "-not='+$('.class-" + columnName + "-not').val();\n}\n");
                } else if ("java.lang.String".equals(fullyQualifiedJavaType.getFullyQualifiedName())) {
                    bufferedWriter.write("if($('.class-" + columnName + "').val()!==undefined &&  $('.class-" + columnName + "').val()!=''){\nqueryString+='&'+'" + columnName + "='+$('.class-" + columnName + "').val();\n}\n");
                    bufferedWriter.write("if($('.class-" + columnName + "-suffix').val()!==undefined &&  $('.class-" + columnName + "-suffix').val()!=''){\nqueryString+='&'+'" + columnName + "-suffix='+$('.class-" + columnName + "-suffix').val();\n}\n");
                    bufferedWriter.write("if($('.class-" + columnName + "-prefix').val()!==undefined &&  $('.class-" + columnName + "-prefix').val()!=''){\nqueryString+='&'+'" + columnName + "-prefix='+$('.class-" + columnName + "-prefix').val();\n}\n");
                    bufferedWriter.write("if($('.class-" + columnName + "-like').val()!==undefined &&  $('.class-" + columnName + "-like').val()!=''){\nqueryString+='&'+'" + columnName + "-like='+$('.class-" + columnName + "-like').val();\n}\n");
                    bufferedWriter.write("if($('.class-" + columnName + "-not').val()!==undefined &&  $('.class-" + columnName + "-not').val()!=''){\nqueryString+='&'+'" + columnName + "-not='+$('.class-" + columnName + "-not').val();\n}\n");
                }
            }
        }
        bufferedWriter.write("var url=SERVER_URL+\"/v1/common/" + MybatisUtilCommon.getTableNameWithSlash(introspectedTable) + "/query?\"+queryString;\n");
        bufferedWriter.write("$.ajax({\n");
        bufferedWriter.write("url: url,\n");
        bufferedWriter.write("type: \"get\",\n");
        bufferedWriter.write("cache: false,\n");
        bufferedWriter.write("async: true,\n");
        bufferedWriter.write("headers: {\"token\": token },\n");
        bufferedWriter.write("contentType: \"application/json\",\n");
        bufferedWriter.write("success: function (res) {\n");
        bufferedWriter.write("if(res.status!=200){\n");
        bufferedWriter.write("validResForContent(res);\n");
        bufferedWriter.write("}else{\n");
        bufferedWriter.write("var list = res.data;\n");
        bufferedWriter.write("var articleHtmlString = '';\n");
        bufferedWriter.write("var tableString = '<section style=\"padding-bottom:6px;\"><table class=\"table class-table-article-section-content\">';\n");
        bufferedWriter.write("if(list==null){tableString='empty';}else{\n");
        writeScriptTableHead(bufferedWriter, introspectedTable);
        bufferedWriter.write("for(i=0;i<list.length;i++){\n");
        writeScriptTable(bufferedWriter, introspectedTable);
        bufferedWriter.write("}\n");
        bufferedWriter.write("}\n");
        bufferedWriter.write("tableString +='</table></section>';\n");
        bufferedWriter.write("var totalPage=res.totalPage;\n");
        bufferedWriter.write("var page=res.page;\n");
        bufferedWriter.write("var pageString=\"<section style='padding-bottom:6px;'><div class='class-div-article-section-pager-top'  ondblclick='queryPage(1)'><span class='class-span-page' style='padding:6px;border:1px solid #a6a6a6;' onclick='queryPage(1)'>1</span>\";\n");
        bufferedWriter.write("pageString+=\"\";\n");
        bufferedWriter.write("if(page>=4){pageString+=\"<span class='class-span-page' style='padding:6px;border:1px solid #a6a6a6;' onclick='queryPage(\"+(page-2)+\")'>\"+(page-2)+\"</span>\";}\n");
        bufferedWriter.write("if(page>=3){pageString+=\"<span class='class-span-page' style='padding:6px;border:1px solid #a6a6a6;' onclick='queryPage(\"+(page-1)+\")'>\"+(page-1)+\"</span>\";}\n");
        bufferedWriter.write("if(page>=2 && page<=totalPage-1){pageString+=\"<span class='class-span-page' style='background-color:#a6a6a6;padding:6px;border:1px solid #a6a6a6;' onclick='queryPage(\"+(page)+\")'>\"+(page)+\"</span>\";}\n");
        bufferedWriter.write("if(page<=totalPage-2){pageString+=\"<span class='class-span-page' style='padding:6px;border:1px solid #a6a6a6;' onclick='queryPage(\"+(page+1)+\")'>\"+(page+1)+\"</span>\";}\n");
        bufferedWriter.write("if(page<=totalPage-3){pageString+=\"<span class='class-span-page' style='padding:6px;border:1px solid #a6a6a6;' onclick='queryPage(\"+(page+2)+\")'>\"+(page+2)+\"</span>\";}\n");
        bufferedWriter.write("pageString+=\"\";\n");
        bufferedWriter.write("pageString+=\"<span class='class-span-page' style='padding:6px;border:1px solid #a6a6a6;' onclick='queryPage(\"+(totalPage)+\")'>\"+(totalPage)+\"</span>\";\n");
        bufferedWriter.write("pageString+=\"&nbsp;页码:<span class='class-span-page' style='padding:6px;border:1px solid #a6a6a6;' >\"+page+\"/\"+totalPage+\"</span></div></section>\";\n");
        bufferedWriter.write("articleHtmlString = pageString+tableString+pageString;\n");
        bufferedWriter.write("$('.class-article-content').html(articleHtmlString);\n");
        bufferedWriter.write("}\n");
        bufferedWriter.write("},\n");
        bufferedWriter.write("error: function (message) {\n");
        bufferedWriter.write("$('.class-table-article-section-content').html(message.responseText == undefined ? \"无法连接服务器\" : message.responseText);\n");
        bufferedWriter.write("}\n");
        bufferedWriter.write("});\n");
        bufferedWriter.write("};\n");
    }

    public static void writeScriptTable(BufferedWriter bufferedWriter, IntrospectedTable introspectedTable) throws
            IOException {
        String tableId = /*MybatisUtilCommon.generateToken()*/"table-id";
        bufferedWriter.write("tableString+=\"<tr ondblclick=\\\"if($('.class-image-cancel-\"+i+\"').css('display')=='none'){editThisLine('" + tableId + "-\"+i+\"')}else{cancelThisLine('" + tableId + "-\"+i+\"')}\\\"  class='class-tr-\"+i+\" class-tr-" + tableId + "-\"+i+\"'>" +
                "<td class='class-td-image-" + tableId + "-\"+i+\"' >" +
                "<image src='" + MybatisUtilCommon.loadingImageSrc + "'            class='class-image-loading-" + tableId + "-\"+i+\"' style='display:none;' />" +
                "</td><td>" +
                "<image src='content/page-common/image/edit.svg'" +
                " class='class-image-icon class-image-edit-\"+i+\" class-image-edit-" + tableId + "-\"+i+\"'   onclick=\\\"editThisLine('" + tableId + "-\"+i+\"')\\\" style='cursor:pointer'/>" +
                "</td><td>" +
                "<image src='content/page-common/image/yes.svg'" +
                " class='class-image-icon class-image-confirm-\"+i+\" class-image-confirm-" + tableId + "-\"+i+\"'  onclick=\\\"confirmThisLine('" + tableId + "-\"+i+\"')\\\" style='cursor:pointer;display:none;' />" +
                "</td><td>" +
                "<image src='content/page-common/image/no.svg'  " +
                "class='class-image-icon class-image-cancel-\"+i+\" class-image-cancel-" + tableId + "-\"+i+\"' onclick=\\\"cancelThisLine('" + tableId + "-\"+i+\"')\\\" style='cursor:pointer;display:none;' />" +
                "</td><td>" +
                "<image src='content/page-common/image/delete.svg' " +
                " class='class-image-icon class-image-delete-\"+i+\" class-image-delete-" + tableId + "-\"+i+\"' onclick=\\\"deleteThisLine('" + tableId + "-\"+i+\"')\\\" style='cursor:pointer'  />" +
                "</td>\";\n");
        List<IntrospectedColumn> introspectedColumns = introspectedTable.getAllColumns();
        List<IntrospectedColumn> introspectedColumnsPrimaryKey = introspectedTable.getPrimaryKeyColumns();
        Iterator<IntrospectedColumn> iterator = introspectedColumns.iterator();
        String table = introspectedTable.getBaseRecordType();
        String[] tableNames = table.split("\\.");
        String tableName = tableNames[tableNames.length - 1];
        while (iterator.hasNext()) {
            IntrospectedColumn introspectedColumn = iterator.next();
            FullyQualifiedJavaType fullyQualifiedJavaType = introspectedColumn
                    .getFullyQualifiedJavaType();
            String columnName = introspectedColumn.getJavaProperty();
            bufferedWriter.write("tableString+= \"<td title='" + introspectedColumn.getRemarks() + "' class='class-td-" + columnName + "-\"+i+\" class-td-" + tableId + "-\"+i+\"'>" +
                    "<span class='class-span-\"+i+\"-" + columnName + " class-span-" + tableId + "-\"+i+\" class-span-" + tableId + "-\"+i+\"-" + columnName + "' columnName='" + columnName + "' >\"+" +
                    ("java.util.Date".equals(fullyQualifiedJavaType.getFullyQualifiedName()) ?
                            "timestampToTime(list[i]." + columnName + ")" :
                            "list[i]." + columnName
                    ) +
                    "+\"</span>" +
                    "<input " +
                    "" + (introspectedColumnsPrimaryKey.contains(introspectedColumn) ? "disabled" : "") + " " +
                    "class='class-input-\"+i+\"-" + columnName + " class-input-" + tableId + "-\"+i+\" class-input-" + tableId + "-\"+i+\"-" + columnName + "' columnName='" + columnName + "' " +
                    "style='font-size:12px; display:none; width:70%; ' " +
                    "value=\\\"\"+(list[i]." + columnName + "+\"\")+\"\\\"" +
                    ">\"+\n" +
                    "\"<button style='display:none;margin-left:6px;background-color:#f6f6f6;border:1px solid #666666;padding:3px;width:20px;height:20px;' " +
                    "class='class-button-after-input  class-button-" + tableName + "-" + columnName + "  class-button-detail-" + columnName + " class-button-" + columnName + "' " +
                    "number=\"+i+\"><image src='content/page-common/image/wrench.svg' class='class-image-icon' />" +
                    "</button>" +
                    "</td>\";\n");
        }
        bufferedWriter.write("tableString+='</tr>';\n");
    }

    private static void writeScriptTableHead(BufferedWriter bufferedWriter, IntrospectedTable introspectedTable) throws
            IOException {
        List<IntrospectedColumn> introspectedColumns = introspectedTable.getAllColumns();
        Iterator<IntrospectedColumn> iterator = introspectedColumns.iterator();
        bufferedWriter.write("tableString+=\"<tr ondblclick=\\\"if($('.columnCondition').css('display')=='none'){$('.columnCondition').show();$('.class-query-div').show();}else{$('.columnCondition').hide();}\\\"><th style='width:26px;'>加载</th><th style='width:26px;'>编辑</th><th style='width:26px;'>确认</th><th style='width:26px;'>取消</th><th style='width:26px;'>删除</th>\";\n");
        while (iterator.hasNext()) {
            IntrospectedColumn introspectedColumn = iterator.next();
            FullyQualifiedJavaType fullyQualifiedJavaType = introspectedColumn
                    .getFullyQualifiedJavaType();
            String columnName = introspectedColumn.getJavaProperty();
            bufferedWriter.write("tableString+= \"<th title='" + introspectedColumn.getRemarks() + "'>" + columnName + "</th>\";\n");
        }
        bufferedWriter.write("tableString+='</tr>';\n");
    }

    private static void writeScriptForEditLine(BufferedWriter bufferedWriter, IntrospectedTable introspectedTable) throws
            IOException {
        bufferedWriter.write("var editThisLine = function(tableId){");
        bufferedWriter.write("$(\".class-span-\"+tableId).hide();\n");
        bufferedWriter.write("$(\".class-image-edit-\"+tableId).hide();\n");
        bufferedWriter.write("$(\".class-image-cancel-\"+tableId).show();\n");
        bufferedWriter.write("$(\".class-image-confirm-\"+tableId).show();\n");
        bufferedWriter.write("$(\".class-input-\"+tableId).show();\n");
        bufferedWriter.write("$(\".class-image-showSelectBox-\"+tableId).show();\n");
        bufferedWriter.write("}\n");
    }

    private static void writeScriptForCancelThisLine(BufferedWriter bufferedWriter, IntrospectedTable
            introspectedTable) throws IOException {
        bufferedWriter.write("var cancelThisLine = function(tableId){");
        bufferedWriter.write("$(\".class-span-\"+tableId).show();\n");
        bufferedWriter.write("$(\".class-image-edit-\"+tableId).show();\n");
        bufferedWriter.write("$(\".class-input-\"+tableId).hide();\n");
        bufferedWriter.write("$(\".class-image-cancel-\"+tableId).hide();\n");
        bufferedWriter.write("$(\".class-image-confirm-\"+tableId).hide();\n");
        bufferedWriter.write("$(\".class-image-showSelectBox-\"+tableId).hide();\n");
        List<IntrospectedColumn> introspectedColumns = introspectedTable.getAllColumns();
        List<IntrospectedColumn> introspectedColumnsPrimaryKey = introspectedTable.getPrimaryKeyColumns();
        Iterator<IntrospectedColumn> iterator = introspectedColumns.iterator();
        while (iterator.hasNext()) {
            IntrospectedColumn introspectedColumn = iterator.next();
            String columnName = introspectedColumn.getJavaProperty();
            bufferedWriter.write("$(\".class-input-\"+tableId+\"-" + columnName + "\").val($(\".class-span-\"+tableId+\"-" + columnName + "\").html());\n");
        }
        bufferedWriter.write("}\n");
    }


    private static void writeScriptForConfirmThisLine(BufferedWriter bufferedWriter, IntrospectedTable
            introspectedTable, String tableName) throws IOException {
        bufferedWriter.write("var confirmThisLine = function(tableId){");
        bufferedWriter.write("$(\".class-image-loading-\"+tableId).show();\n");
        bufferedWriter.write("$(\".class-input-\"+tableId).attr('disabled','disabled');\n");
        bufferedWriter.write("var url=SERVER_URL+\"/v1/common/" + MybatisUtilCommon.getTableNameWithSlash(introspectedTable) + "/update\";\n");
        bufferedWriter.write("var token=getLocalStorageItem(\"token\");\n");
        bufferedWriter.write("$.ajax({\n");
        bufferedWriter.write("url: url,\n");
        bufferedWriter.write("type: \"post\",\n");
        bufferedWriter.write("cache: false,\n");
        bufferedWriter.write("async: true,\n");
        bufferedWriter.write("headers: {\"token\": token },\n");
        bufferedWriter.write("contentType: \"application/json\",\n");
        bufferedWriter.write("data: JSON.stringify({\n");
        List<IntrospectedColumn> introspectedColumns = introspectedTable.getAllColumns();
        List<IntrospectedColumn> introspectedColumnsPrimaryKey = introspectedTable.getPrimaryKeyColumns();
        Iterator<IntrospectedColumn> iterator = introspectedColumns.iterator();
        Integer columnCount = 0;
        while (iterator.hasNext()) {
            IntrospectedColumn introspectedColumn = iterator.next();
            String columnName = introspectedColumn.getJavaProperty();
            bufferedWriter.write("\"" + columnName + "\": $(\".class-input-\" + tableId + \"-" + columnName + "\").val(),\n");
            columnCount += 1;
        }
        bufferedWriter.write("}),\n");
        bufferedWriter.write("success: function (res) {\n");
        bufferedWriter.write("$(\".class-image-loading-\"+tableId).hide();\n");
        bufferedWriter.write("$(\".class-input-\"+tableId).removeAttr('disabled');\n");
        bufferedWriter.write("if(res.status!=200){\n");
        bufferedWriter.write("validResForContent(res);\n");
        bufferedWriter.write("}else{\n");
        introspectedColumns = introspectedTable.getAllColumns();
        iterator = introspectedColumns.iterator();
        while (iterator.hasNext()) {
            IntrospectedColumn introspectedColumn = iterator.next();
            String columnName = introspectedColumn.getJavaProperty();
            bufferedWriter.write("$(\".class-span-\"+tableId+\"-" + columnName + "\").html($(\".class-input-\"+tableId+\"-" + columnName + "\").val());\n");
        }
        bufferedWriter.write("$(\".class-input-\"+tableId).hide();\n");
        bufferedWriter.write("$(\".class-span-\"+tableId).show();\n");
        bufferedWriter.write("$(\".class-image-edit-\"+tableId).show();\n");
        bufferedWriter.write("$(\".class-image-cancel-\"+tableId).hide();\n");
        bufferedWriter.write("$(\".class-image-confirm-\"+tableId).hide();\n");
        bufferedWriter.write("$(\".class-image-showSelectBox-\"+tableId).hide();\n");
        bufferedWriter.write("}\n");
        bufferedWriter.write("}\n");
        bufferedWriter.write("});\n");
        bufferedWriter.write("}\n");
    }

    private static void writeScriptForAddLine(BufferedWriter bufferedWriter, IntrospectedTable
            introspectedTable, String tableName) throws IOException {
        bufferedWriter.write("var addLine =function(){\n");
        bufferedWriter.write("$(\".class-div-add-line\").show();\n");
        bufferedWriter.write("}\n");
    }

    private static void writeScriptForCloseThisLineDiv(BufferedWriter bufferedWriter, IntrospectedTable
            introspectedTable, String tableName) throws IOException {
        bufferedWriter.write("var closeThisLineDiv =function(){\n");
        Boolean hasBlob = false;
        List<IntrospectedColumn> introspectedColumns = introspectedTable.getAllColumns();
        //List<IntrospectedColumn> introspectedColumnsPrimaryKey = introspectedTable.getPrimaryKeyColumns();
        Iterator<IntrospectedColumn> iterator = introspectedColumns.iterator();
        while (iterator.hasNext()) {
            IntrospectedColumn introspectedColumn = iterator.next();
            String columnName = introspectedColumn.getJavaProperty();
            if (introspectedColumn.getLength() > MybatisUtilCommon.COLUMN_FIELD_LENGTH || introspectedColumn.isBLOBColumn()) {
                hasBlob = true;
            }
        }
        if (hasBlob == true) {
            bufferedWriter.write("location.href=location.href.split('#')[0];\n");
        } else {
            bufferedWriter.write("$(\".class-div-add-line\").hide();\n");
        }
        bufferedWriter.write("}\n");
    }

    private static void writeScriptForSubmitThisLineDiv(BufferedWriter bufferedWriter, IntrospectedTable
            introspectedTable, String tableName) throws IOException {
        bufferedWriter.write("var submitThisLineDiv = function(){\n");
        bufferedWriter.write("$(\".class-div-add-line-button\").append(loadingImage);\n");
        bufferedWriter.write("$('.class-input-add-line-column').attr('disabled','disabled');\n");
        bufferedWriter.write("var url=SERVER-URL+\"/v1/common/" + MybatisUtilCommon.getTableNameWithSlash(introspectedTable) + "/create\";\n");
        bufferedWriter.write("var token=getLocalStorageItem(\"token\");\n");
        bufferedWriter.write("$.ajax({\n");
        bufferedWriter.write("url: url,\n");
        bufferedWriter.write("type: \"post\",\n");
        bufferedWriter.write("cache: false,\n");
        bufferedWriter.write("async: true,\n");
        bufferedWriter.write("headers: {\"token\": token },\n");
        bufferedWriter.write("contentType: \"application/json\",\n");
        bufferedWriter.write("data: JSON.stringify({\n");
        List<IntrospectedColumn> introspectedColumns = introspectedTable.getAllColumns();
        List<IntrospectedColumn> introspectedColumnsPrimaryKey = introspectedTable.getPrimaryKeyColumns();
        Iterator<IntrospectedColumn> iterator = introspectedColumns.iterator();
        while (iterator.hasNext()) {
            IntrospectedColumn introspectedColumn = iterator.next();
            String columnName = introspectedColumn.getJavaProperty();
            if (introspectedColumn.getLength() > MybatisUtilCommon.COLUMN_FIELD_LENGTH || introspectedColumn.isBLOBColumn()) {
                bufferedWriter.write("\"" + columnName + "\": $(\".class-input-add-line-" + columnName + "\").html()==\"\"?null:$(\".class-input-add-line-" + columnName + "\").html(),\n");
            } else {
                bufferedWriter.write("\"" + columnName + "\": $(\".class-input-add-line-" + columnName + "\").val()==\"\"?null:$(\".class-input-add-line-" + columnName + "\").val(),\n");
            }
        }
        bufferedWriter.write("}),\n");
        bufferedWriter.write("success: function (res) {\n");
        bufferedWriter.write("$(\".class-div-add-line-button\").find('.class-loading-image-only').remove();\n");
        bufferedWriter.write("$(\".class-input-add-line-column\").removeAttr('disabled');\n");
        bufferedWriter.write("if(res.status!=200){\n");
        bufferedWriter.write("validResForContent(res);\n");
        bufferedWriter.write("}else{\n");
        bufferedWriter.write("$(\".class-div-add-line\").hide();\n" /*+
                "$(\".class-input-add-line-column\").val(\"\");\n"*/);
        bufferedWriter.write("alert(res.message);\n");
        bufferedWriter.write("}\n");
        bufferedWriter.write("}\n");
        bufferedWriter.write("});\n");
        bufferedWriter.write("}\n");
    }

    private static void writeScriptForDeleteThisLineDiv(BufferedWriter bufferedWriter, IntrospectedTable
            introspectedTable, String tableName) throws IOException {
        bufferedWriter.write("var deleteThisLine = function(tableId){");
        bufferedWriter.write("if(confirm('确认删除吗？')==0){return;}\n");
        bufferedWriter.write("$(\".class-image-loading-\"+tableId).show();\n");
        bufferedWriter.write("$(\".class-input-\"+tableId).attr('disabled','disabled');\n");
        bufferedWriter.write("var url=SERVER_URL+\"/v1/common/" + MybatisUtilCommon.getTableNameWithSlash(introspectedTable) + "/delete");
        List<IntrospectedColumn> introspectedColumnsPrimaryKey = introspectedTable.getPrimaryKeyColumns();
        Iterator<IntrospectedColumn> iteratorPrimaryKey = introspectedColumnsPrimaryKey.iterator();
        while (iteratorPrimaryKey.hasNext()) {
            IntrospectedColumn introspectedColumn = iteratorPrimaryKey.next();
            String columnName = introspectedColumn.getJavaProperty();
            if (introspectedColumn.isBLOBColumn()) {
            } else {
                bufferedWriter.write("/\"+$(\".class-span-\"+tableId+\"-" + columnName + "\").html()+\"");
            }
        }
        bufferedWriter.write("\";\n");
        bufferedWriter.write("var token=getLocalStorageItem(\"token\");\n");
        bufferedWriter.write("$.ajax({\n");
        bufferedWriter.write("url: url,\n");
        bufferedWriter.write("type: \"get\",\n");
        bufferedWriter.write("cache: false,\n");
        bufferedWriter.write("async: true,\n");
        bufferedWriter.write("headers: {\"token\": token },\n");
        bufferedWriter.write("contentType: \"application/json\",\n");
        List<IntrospectedColumn> introspectedColumns = introspectedTable.getPrimaryKeyColumns();
        Iterator<IntrospectedColumn> iterator = introspectedColumns.iterator();
        bufferedWriter.write("success: function (res) {\n");
        bufferedWriter.write("$(\".class-image-loading-\"+tableId).hide();\n");
        bufferedWriter.write("$(\".class-input-\"+tableId).removeAttr('disabled');\n");
        bufferedWriter.write("if(res.status!=200){\n");
        bufferedWriter.write("validResForContent(res);\n");
        bufferedWriter.write("}else{\n");
        bufferedWriter.write("$('.class-tr-'+tableId).remove();");
        bufferedWriter.write("}\n");
        bufferedWriter.write("}\n");
        bufferedWriter.write("});\n");
        bufferedWriter.write("}\n");
    }

    public static void writeLoginPage(IntrospectedTable introspectedTable, String htmlPath, String modelUrl, String encryptPasswordMethod) {
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "");
            folder.mkdirs();
            file = new File(htmlPath + "/page-login.html");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            String table = introspectedTable.getBaseRecordType();
            String tableName = table.replaceAll(modelUrl + ".", "");
            bufferedWriter.write("\n");
            bufferedWriter.write("<!DOCTYPE html>\n");
            bufferedWriter.write("<html>\n");
            bufferedWriter.write("<head>\n");
            bufferedWriter.write("<meta charset=\"UTF-8\">\n");
            bufferedWriter.write("<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n");
            bufferedWriter.write("<meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\">\n");
            bufferedWriter.write("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\">\n");
            bufferedWriter.write("<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\">\n");
            bufferedWriter.write("<meta name=\"referrer\" content=\"always\">\n");
            bufferedWriter.write("<meta http-equiv=\"Cache-Control\" content=\"max-age=31536000\" />\n");
            bufferedWriter.write("<title>login</title>\n");
            bufferedWriter.write("<style>\n");
            bufferedWriter.write("html, body {height: 100%;}body {\n" +
                    "font: 12px 'Lucida Sans Unicode', 'Trebuchet MS', Arial, Helvetica;margin: 0;\n" +
                    "}\n" +
                    "#login {background-color: #fff;background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#eee));" +
                    "background-image: -webkit-linear-gradient(top, #fff, #eee);background-image: -moz-linear-gradient(top, #fff, #eee);" +
                    "background-image: -ms-linear-gradient(top, #fff, #eee);background-image: -o-linear-gradient(top, #fff, #eee);" +
                    "background-image: linear-gradient(top, #fff, #eee);height: 240px;width: 400px;margin: -150px 0 0 -230px;padding: 30px;" +
                    "position: absolute;top: 50%;left: 50%;z-index: 0;-moz-border-radius: 3px;-webkit-border-radius: 3px;border-radius: 3px;" +
                    "-webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.2),0 1px 1px rgba(0, 0, 0, .2),0 3px 0 #fff,0 4px 0 rgba(0, 0, 0, .2),0 6px 0 #fff,0 7px 0 rgba(0, 0, 0, .2);" +
                    "-moz-box-shadow: 0 0 2px rgba(0, 0, 0, 0.2),1px 1px 0 rgba(0, 0, 0, .1),3px 3px 0 rgba(255, 255, 255, 1),4px 4px 0 rgba(0, 0, 0, .1),6px 6px 0 rgba(255, 255, 255, 1),7px 7px 0 rgba(0, 0, 0, .1);\n" +
                    "box-shadow: 0 0 2px rgba(0, 0, 0, 0.2),0 1px 1px rgba(0, 0, 0, .2),0 3px 0 #fff,0 4px 0 rgba(0, 0, 0, .2),0 6px 0 #fff,0 7px 0 rgba(0, 0, 0, .2);" +
                    "}\n" +
                    "#login:before {border-radius:12px; content: '';position: absolute;z-index: -1;border: 1px dashed #ccc;top: 5px;bottom: 5px;left: 5px;right: 5px;-moz-box-shadow: 0 0 0 1px #fff;-webkit-box-shadow: 0 0 0 1px #fff;box-shadow: 0 0 0 1px #fff;}\n" +
                    "h1 {text-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0px 2px 0 rgba(0, 0, 0, .5);text-transform: uppercase;text-align: center;color: #666;margin: 0 0 30px 0;letter-spacing: 4px;font: normal 26px/1 Verdana, Helvetica;position: relative;}\n" +
                    "h1:after, h1:before {background-color: #777;content: \"\";height: 1px;position: absolute;top: 15px;width: 120px;}\n" +
                    "h1:after {background-image: -webkit-gradient(linear, left top, right top, from(#777), to(#fff));background-image: -webkit-linear-gradient(left, #777, #fff);background-image: -moz-linear-gradient(left, #777, #fff);background-image: -ms-linear-gradient(left, #777, #fff);background-image: -o-linear-gradient(left, #777, #fff);background-image: linear-gradient(left, #777, #fff);right: 0;}\n" +
                    "h1:before {background-image: -webkit-gradient(linear, right top, left top, from(#777), to(#fff));background-image: -webkit-linear-gradient(right, #777, #fff);background-image: -moz-linear-gradient(right, #777, #fff);background-image: -ms-linear-gradient(right, #777, #fff);background-image: -o-linear-gradient(right, #777, #fff);background-image: linear-gradient(right, #777, #fff);left: 0;}\n" +
                    "fieldset {border: 0;padding: 0;margin: 0;}\n" +
                    "#inputs input {/*background: #f1f1f1 url(images/login-sprite.png) no-repeat;*/padding: 15px 15px 15px 30px;margin: 0 0 10px 0;width: 353px; /* 353 + 2 + 45 = 400 */border: 1px solid #ccc;-moz-border-radius: 5px;-webkit-border-radius: 5px;border-radius: 5px;-moz-box-shadow: 0 1px 1px #ccc inset, 0 1px 0 #fff;-webkit-box-shadow: 0 1px 1px #ccc inset, 0 1px 0 #fff;box-shadow: 0 1px 1px #ccc inset, 0 1px 0 #fff;}\n" +
                    "#username {background-position: 5px -2px !important;}\n" +
                    "#password {background-position: 5px -52px !important;}\n" +
                    "#inputs input:focus {background-color: #fff;border-color: #e8c291;outline: none;-moz-box-shadow: 0 0 0 1px #e8c291 inset;-webkit-box-shadow: 0 0 0 1px #e8c291 inset;box-shadow: 0 0 0 1px #e8c291 inset;}\n" +
                    "#actions {margin: 25px 0 0 0;}\n" +
                    "#submit {background-color: #ffb94b;background-image: -webkit-gradient(linear, left top, left bottom, from(#fddb6f), to(#ffb94b));background-image: -webkit-linear-gradient(top, #fddb6f, #ffb94b);background-image: -moz-linear-gradient(top, #fddb6f, #ffb94b);background-image: -ms-linear-gradient(top, #fddb6f, #ffb94b);background-image: -o-linear-gradient(top, #fddb6f, #ffb94b);background-image: linear-gradient(top, #fddb6f, #ffb94b);-moz-border-radius: 3px;-webkit-border-radius: 3px;border-radius: 3px;text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);-moz-box-shadow: 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.3) inset;-webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.3) inset;box-shadow: 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.3) inset;border-width: 1px;border-style: solid;border-color: #d69e31 #e3a037 #d5982d #e3a037;float: left;height: 35px;padding: 0;width: 120px;cursor: pointer;font: bold 15px Arial, Helvetica;color: #8f5a0a;}\n" +
                    "#submit:hover, #submit:focus {background-color: #fddb6f;background-image: -webkit-gradient(linear, left top, left bottom, from(#ffb94b), to(#fddb6f));background-image: -webkit-linear-gradient(top, #ffb94b, #fddb6f);background-image: -moz-linear-gradient(top, #ffb94b, #fddb6f);background-image: -ms-linear-gradient(top, #ffb94b, #fddb6f);background-image: -o-linear-gradient(top, #ffb94b, #fddb6f);background-image: linear-gradient(top, #ffb94b, #fddb6f);}\n" +
                    "#submit:active {outline: none;-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;}\n" +
                    "#submit::-moz-focus-inner {border: none;}\n" +
                    "#actions a {color: #3151A2;float: right;line-height: 35px;margin-left: 10px;}\n" +
                    "#back {display: block;text-align: center;position: relative;top: 60px;color: #999;}\n");
            bufferedWriter.write("</style>\n");
            writePageHead(bufferedWriter);
            bufferedWriter.write("<script>\n");
            bufferedWriter.write("$(function () {\n");
            bufferedWriter.write("var username = getLocalStorageItem(\"username\");\n");
            bufferedWriter.write("if (username != undefined) {\n");
            bufferedWriter.write("$('.class-username').val(username);\n");
            bufferedWriter.write("}\n");
            bufferedWriter.write("})\n");
            bufferedWriter.write("var login = function () {\n" +
                    "            if($(\".class-username\").val()==\"\"){\n" +
                    "                return;\n" +
                    "            }\n" +
                    "            if($(\".class-password\").val()==\"\"){\n" +
                    "                return;\n" +
                    "            }\n");
            bufferedWriter.write("var username= $(\".class-username\").val();");
            if (encryptPasswordMethod != null && encryptPasswordMethod.equals("sha256")) {
                bufferedWriter.write("var password= sha256($(\".class-password\").val());");
            } else {
                bufferedWriter.write("var password= md5($(\".class-password\").val());");
            }
            bufferedWriter.write("var loginUrl = SERVER_URL + \"/v1/common/admin/login?username=\"+username+\"&password=\"+password;\n");
            bufferedWriter.write("setLocalStorageItem(\"username\", $('.class-username').val());\n");
            bufferedWriter.write("$.ajax({\n");
            bufferedWriter.write("url: loginUrl,\n");
            bufferedWriter.write("type: \"get\",\n");
            bufferedWriter.write("cache: false,\n");
            bufferedWriter.write("async: true,\n");
            bufferedWriter.write("contentType: \"application/json\",\n");
            bufferedWriter.write("success: function (res) {\n");
            bufferedWriter.write("if(res.status==200){\n");
            bufferedWriter.write("if(res.data.token!=undefined){\n");
            bufferedWriter.write("setLocalStorageItem(\"token\",res.data.token);\n");
            bufferedWriter.write("setLocalStorageItem(\"userId\",res.data.userId);\n");
            bufferedWriter.write("setLocalStorageItem(\"username\",res.data.username);\n");
            bufferedWriter.write("}else{\n");
            bufferedWriter.write("setLocalStorageItem(\"token\",res.data);\n");
            bufferedWriter.write("}\n");
            bufferedWriter.write("var top1=top;\n" +
                    "if(top !=undefined){top1.location.href='index.html';}else{" +
                    "location.href=\"index.html\";}\n");
            bufferedWriter.write("}else{\n");
            bufferedWriter.write("validResForIndex(res);\n");
            bufferedWriter.write("}\n");
            bufferedWriter.write("},\n");
            bufferedWriter.write("error: function (message) {\n");
            bufferedWriter.write("alert(message.responseText == undefined ? \"无法连接服务器\" : message.responseText);\n");
            bufferedWriter.write("}\n");
            bufferedWriter.write("});\n");
            bufferedWriter.write("}" +
                    "\n" +
                    "var checkToLogin = function(e){\n" +
                    "    var keynum;\n" +
                    "    keynum = window.event ? e.keyCode : e.which;\n" +
                    "    if(keynum==13){\n" +
                    "        login();\n" +
                    "    }\n" +
                    "}\n");
            bufferedWriter.write("</script>\n");
            bufferedWriter.write("</head>\n");
            bufferedWriter.write("<body style='background-color:#F66666;'>\n");
            bufferedWriter.write("<div id=\"login\" style='border-radius:12px;'>\n");
            bufferedWriter.write("<h1>后台登陆</h1>\n");
            bufferedWriter.write("<fieldset id=\"inputs\">\n");
            bufferedWriter.write("<image src=\"content/page-common/image/person.svg\" style='width:36px;float:left;margin-right:6px;' /><input style='width:306px;' class=\"class-username\" type=\"text\" placeholder=\"Username\" autofocus required>\n");
            bufferedWriter.write("<image src=\"content/page-common/image/lock.svg\" style='width:36px;float:left;margin-right:6px;' /><input onkeydown=\"checkToLogin(event)\" style='width:306px;' class=\"class-password\" type=\"password\" placeholder=\"Password\" required>\n");
            bufferedWriter.write("</fieldset>\n");
            bufferedWriter.write("<fieldset id=\"actions\">\n");
            bufferedWriter.write("<input type=\"button\" onclick=\"login()\" id=\"submit\" value=\"Log in\">\n");
            bufferedWriter.write("</fieldset>\n");
            bufferedWriter.write("</div>\n");
            bufferedWriter.write("<br><br>\n");
            bufferedWriter.write("<div style=\"text-align:center;clear:both\">\n");
            bufferedWriter.write("</div>\n");
            bufferedWriter.write("</body>\n");
            bufferedWriter.write("</html>\n");
            System.out.println("write to file success : " + file.getPath());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeTableJsPage(IntrospectedTable introspectedTable, String htmlPath, String modelUrl, String fileServer, String serverUrl, String basePackage, String aspectPackage) {
        String table = introspectedTable.getBaseRecordType();
        String tableName = table.replaceAll(modelUrl + ".", "");
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/content/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + "/js");
            folder.mkdirs();
            file = new File(htmlPath + "/content/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + "/js/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + ".js");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            writeScriptOnlyForTablePage(bufferedWriter, introspectedTable);
            writeScriptQueryFunction(bufferedWriter, introspectedTable, tableName);
            System.out.println("write to file success : " + file.getPath());
        } catch (
                IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeTableCssPage(IntrospectedTable introspectedTable, String htmlPath, String modelUrl, String fileServer, String serverUrl, String basePackage, String aspectPackage) {
        String table = introspectedTable.getBaseRecordType();
        String tableName = table.replaceAll(modelUrl + ".", "");
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/content/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + "/css");
            folder.mkdirs();
            file = new File(htmlPath + "/content/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + "/css/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + ".css");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            bufferedWriter.write("\n\n\n\n\n\n");
            System.out.println("write to file success : " + file.getPath());
        } catch (
                IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeCssCommonServerCss(String htmlPath, String serverUrl, String tokenErrorStatus, String fileServer) {
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/content/page-common/css");
            folder.mkdirs();
            file = new File(htmlPath + "/content/page-common/css/server.css");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            bufferedWriter.write("\n" +
                    ".class-image-icon{\n" +
                    "    width:12px;\n" +
                    "}\n" +
                    ".class-span-page {\n" +
                    "    cursor: pointer;\n" +
                    "}\n" +
                    "\n" +
                    ".class-span-page:hover {\n" +
                    "    background-color: #ffff00;\n" +
                    "    cursor: pointer;\n" +
                    "}\n" +
                    "\n" +
                    ".class-div-article-section-pager-top {\n" +
                    "    margin-top: 8px;\n" +
                    "    margin-bottom: 8px;\n" +
                    "}\n" +
                    "\n" +
                    ".class-div-article-section-pager-bottom {\n" +
                    "    margin-top: 8px;\n" +
                    "    margin-bottom: 8px;\n" +
                    "}\n" +
                    "\n" +
                    ".class-div-query-button-and-number {\n" +
                    "    margin-top: 6px;\n" +
                    "    height: 31px;\n" +
                    "    padding-bottom: 6px;\n" +
                    "}\n" +
                    "\n" +
                    "table {\n" +
                    "    empty-cells: show;\n" +
                    "    border-collapse: collapse;\n" +
                    "    margin: 0 auto;\n" +
                    "}\n" +
                    "\n" +
                    "td {\n" +
                    "    height: 30px;\n" +
                    "    text-align: center;\n" +
                    "}\n" +
                    "\n" +
                    "h1, h2, h3 {\n" +
                    "    font-size: 12px;\n" +
                    "    margin: 0;\n" +
                    "    padding: 0;\n" +
                    "}\n" +
                    "\n" +
                    ".table {\n" +
                    "    width: 100%;\n" +
                    "    border: 1px solid #cad9ea;\n" +
                    "    color: #666;\n" +
                    "}\n" +
                    "\n" +
                    ".table th {\n" +
                    "    background-repeat: repeat-x;\n" +
                    "    height: 30px;\n" +
                    "}\n" +
                    "\n" +
                    ".table td, .table th {\n" +
                    "    border: 1px solid #cad9ea;\n" +
                    "    padding: 0 1em 0;\n" +
                    "}\n" +
                    "\n" +
                    ".table tr.alter {\n" +
                    "    background-color: #f5fafe;\n" +
                    "}\n" +
                    "\n" +
                    ".btn {\n" +
                    "    padding: 6px;\n" +
                    "    color: #fff;\n" +
                    "    text-decoration: none;\n" +
                    "    cursor: pointer;\n" +
                    "}\n" +
                    "\n" +
                    ".btn * {\n" +
                    "    font-style: normal;\n" +
                    "    background-repeat: no-repeat;\n" +
                    "    display: block;\n" +
                    "    position: relative;\n" +
                    "}\n" +
                    "\n" +
                    ".btn i {\n" +
                    "    background-position: top left;\n" +
                    "    position: absolute;\n" +
                    "    margin-bottom: -5px;\n" +
                    "    top: 0;\n" +
                    "    left: 0;\n" +
                    "    width: 5px;\n" +
                    "    height: 5px;\n" +
                    "}\n" +
                    "\n" +
                    ".btn span {\n" +
                    "    background-position: bottom left;\n" +
                    "    left: -5px;\n" +
                    "    padding: 0 0 5px 10px;\n" +
                    "    margin-bottom: -5px;\n" +
                    "}\n" +
                    "\n" +
                    ".btn span i {\n" +
                    "    background-position: bottom right;\n" +
                    "    margin-bottom: 0;\n" +
                    "    position: absolute;\n" +
                    "    left: 100%;\n" +
                    "    width: 10px;\n" +
                    "    height: 100%;\n" +
                    "    top: 0;\n" +
                    "}\n" +
                    "\n" +
                    ".btn span span {\n" +
                    "    background-position: top right;\n" +
                    "    position: absolute;\n" +
                    "    right: -10px;\n" +
                    "    margin-left: 10px;\n" +
                    "    top: -5px;\n" +
                    "    height: 0;\n" +
                    "}\n" +
                    "\n" +
                    "* html .btn span, * html .btn i {\n" +
                    "    float: left;\n" +
                    "    width: auto;\n" +
                    "    background-image: none;\n" +
                    "    cursor: pointer;\n" +
                    "}\n" +
                    "\n" +
                    ".btn.pink {\n" +
                    "    background: #e1a;\n" +
                    "}\n" +
                    "\n" +
                    ".btn:hover {\n" +
                    "    background-color: #F66666;\n" +
                    "}\n" +
                    "\n" +
                    ".btn:active {\n" +
                    "    background-color: #444;\n" +
                    "}\n" +
                    "\n" +
                    ".btn[class] {\n" +
                    "    background-position: bottom;\n" +
                    "}\n" +
                    "\n" +
                    "* html .btn {\n" +
                    "    border: 3px double #aaa;\n" +
                    "}\n" +
                    "\n" +
                    "* html .btn.pink {\n" +
                    "    border-color: #e1a;\n" +
                    "}\n" +
                    "\n" +
                    "* html .btn:hover {\n" +
                    "    border-color: #F66666;\n" +
                    "}\n" +
                    "\n" +
                    "p {\n" +
                    "    clear: both;\n" +
                    "    padding-bottom: 2em;\n" +
                    "}\n" +
                    "\n" +
                    "form {\n" +
                    "    margin-top: 2em;\n" +
                    "}\n" +
                    "\n" +
                    "form p .btn {\n" +
                    "    margin-right: 1em;\n" +
                    "}\n" +
                    "\n" +
                    "textarea {\n" +
                    "    margin: 1em 0;\n\n" +
                    "    font-family: Inconsolata, Consolas, Courier, \"Courier New\", sans-serif;\n" +
                    "}\n" +
                    ".class-button-after-input:hover{\n" +
                    "    background-color:#F66666;\n" +
                    "}\n" +
                    ".class-button-query{\n" +
                    "\n" +
                    "}\n");
            System.out.println("write to file success : " + file.getPath());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }

    }

    public static void writeJsCommonValueJs(String htmlPath, String serverUrl, String tokenErrorStatus, String fileServer) {
        if (serverUrl == null) {
            serverUrl = "http://localhost:8080/";
        }
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/content/page-common/js");
            folder.mkdirs();
            file = new File(htmlPath + "/content/page-common/js/common-value.js");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            file.createNewFile();
            fileOutputStream = new FileOutputStream(file);
            bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
            bufferedWriter.write("var SERVER_URL='" + serverUrl + "';\n");
            bufferedWriter.write("var loadingImage = \"<image class='class-loading-image-only' src='" + MybatisUtilCommon.loadingImageSrc + "'>\";\n");
            System.out.println("write to file success : " + file.getPath());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeTableJsCustomTableJs(IntrospectedTable introspectedTable, String htmlPath, String modelUrl, String fileServer, String serverUrl, String basePackage, String aspectPackage) {
        String table = introspectedTable.getBaseRecordType();
        String tableName = table.replaceAll(modelUrl + ".", "");
        if (serverUrl == null) {
            serverUrl = "http://localhost:8080/";
        }
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/custom/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + "/js");
            folder.mkdirs();
            file = new File(htmlPath + "/custom/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + "/js/custom-" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + ".js");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            if (!file.exists()) {
                file.createNewFile();
                fileOutputStream = new FileOutputStream(file);
                bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
                bufferedWriter.write("\n");
                System.out.println("write to file success : " + file.getPath());
            } else {
                System.out.println("write to file success : " + file.getPath());
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeTableCssCustomTableCss(IntrospectedTable introspectedTable, String htmlPath, String modelUrl, String fileServer, String serverUrl, String basePackage, String aspectPackage) {
        String table = introspectedTable.getBaseRecordType();
        String tableName = table.replaceAll(modelUrl + ".", "");
        if (serverUrl == null) {
            serverUrl = "http://localhost:8080/";
        }
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/custom/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + "/css");
            folder.mkdirs();
            file = new File(htmlPath + "/custom/" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + "/css/custom-" + MybatisUtilCommon.getLowerCaseAndDash(tableName) + ".css");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            if (!file.exists()) {
                file.createNewFile();
                fileOutputStream = new FileOutputStream(file);
                bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
                bufferedWriter.write("\n");
                System.out.println("write to file success : " + file.getPath());
            } else {
                System.out.println("write to file success : " + file.getPath());
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeCustomIndexCss(IntrospectedTable introspectedTable, String htmlPath, String modelUrl) {
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/custom/index/css");
            folder.mkdirs();
            file = new File(htmlPath + "/custom/index/css/custom-index.css");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            if (!file.exists()) {
                file.createNewFile();
                fileOutputStream = new FileOutputStream(file);
                bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
                bufferedWriter.write("\n");
                System.out.println("write to file success : " + file.getPath());
            } else {
                System.out.println("write to file success : " + file.getPath());
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

    public static void writeCustomIndexJs(IntrospectedTable introspectedTable, String htmlPath, String modelUrl) {
        File file = null;
        OutputStream fileOutputStream = null;
        BufferedWriter bufferedWriter = null;
        try {
            File folder = new File(htmlPath + "/custom/index/js");
            folder.mkdirs();
            file = new File(htmlPath + "/custom/index/js/custom-index.js");
            //如果文件不存在，则创建文件，如果已存在，则覆盖
            if (!file.exists()) {
                file.createNewFile();
                fileOutputStream = new FileOutputStream(file);
                bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream, "utf-8"));
                bufferedWriter.write("\n");
                System.out.println("write to file success : " + file.getPath());
            } else {
                System.out.println("write to file success : " + file.getPath());
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            MybatisUtilCommon.closeBufferWriterAndFileOutputStream(fileOutputStream, bufferedWriter);
        }
    }

}
